Method for reversibly transforming data format, image processing apparatus, program for reversibly transforming data format, and computer-readable recording medium thereof

ABSTRACT

In a method for reversibly transforming a data format a forward transformation and a backward transformation are reciprocally conducted for data between unit systems having different resolution levels, and the forward transformation and the backward transformation, a first unit system having a lower resolution level is used as a common unit system, and a reversible data conversion is conducted by an integer operation for data in the first unit system having the lower resolution level and data in a second unit system having a higher resolution level higher than the first unit system.

BACKGROUND OF TEE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention generally relates to a transforming process for transforming a format of image data, and in particular, a method for reversibly transforming data format, an image processing apparatus, a program for reversibly transforming data format, and a computer-readable recording medium thereof, in which a color space transforming process is conducted in a system where a lossless/lossy compression/extraction is conducted with respect to the image data in a color space.

[0003] 2. Description of the Related Art

[0004] A color space is one of areas in a vector space that is a three dimensions or higher dimensions. For example, a color coordinate system is defined by three dimensional vectors being three linear independences as bases. In the color coordinated that is generally used, each of R (Red), G (Green), and B (Black) are defined by a central wavelength. When a certain three dimensional color coordinate system is given, any three dimensional linear color coordinate other than the certain three dimensional color coordinate can be expressed by a reversible 3×3 matrix (non-singular)

[0005] In practice, various color coordinates (color spaces) are defined by various reasons. For example, in a case of displaying data at a monitor, a RGB coordinate system is used in almost all digital color images. For example, a fixed range being 8 bits/coordinate is preferable. In a case of a compression requiring a color noncorrelativity, the RGB coordinate system is not suitable but another color coordinate system such as a YIQ coordinate system is more suitable. Also, a YUV coordinate system and a YCrCb coordinate system are suitable. Regarding a separation between a brightness and a chrominance relating to a luminosity, these opponent color coordinates systems attempt to improve a separation of a characteristic and an appearance of a change of the chrominance in the same brightness.

[0006] In addition, in image for a print, a subtractive color system such as a CMY (Cyan, Magenta, and Yellow) is used. Alternatively, a perfect four dimensional space such as a CMYK (Cyan, Magenta, Yellow, and Black) is used.

[0007] The data compression is extremely useful to store and transmit a large amount of data. For example, a necessary time to transmit image data such as a facsimile transmission of a document can be significantly reduced by compressing the image data and reducing the number of bits necessary to reproduce an image.

[0008] Conventionally, there are various data compressing methods. The compressing methods can be classified into two categories: that is, a lossy coding and a lossless coding. In the lossy coding, loss of image data maybe occur. Accordingly, an original image can not be guaranteed to be produced perfectly. An purpose of the lossy compression is to prevent a change caused by reproducing the image data from being unpleasant and conspicuous. In the lossless compression, all the image data are stored and compressed in a state in that the image data can be perfectly reproduced.

[0009] In the lossless compression, an input symbol or brightness data are converted into an output code word. As input data, image data, voice data, one dimensional data (for example, data changing temporally), two dimensional data (for example, data changing to two space axis directions), and multi-dimensional/multi-spectrum data are used. When data are successfully compressed, the code words of the compressed data are expressed by the number of hits fewer than the number of bits of the input symbol (or the brightness data) As the lossless coding method, a dictionary coding method (for example, Lempel-Ziv coding method), a run length coding method, an arithmetic coding method, and an entropy coding method are used. In a case of the lossless image compression, the basic of the compression is a prediction, a context, and a coding. A JBIG standard for a facsimile compression and a DPCM (Difference Pulse Coding Modulation that is an option of a JPEG standard) for a continuous-tone image are examples of the lossless compression for the image. In the lossy compression, the input symbol and the brightness data are converted into output code words after quantized. Purposes of the quantization is to store characteristic data being important portions of data and also to eliminate unimportant data. In the lossy compression, a conversion for an energy concentration is utilized before the quantization. A base line JPEG is one example of the lossy coding method for the image data.

[0010] Conventionally, a color coordinate transformation has been utilized for the lossless compression with the quantization. In the lossless compressing system or the lossless/lossy compressing system, a main essential requirement is reversibility and effectiveness of a transformation. In other lossless/lossy compressing systems, a non-correlation of colors is one factor other than the effectiveness of a reversible transformation. For example, the 3×3 matrix in used for the lossy compression only. Because factors are not integers, when the non-correlation is required, errors are involved in a process while data is alternately compressed and extended.

[0011] When the color space is transformed, a calculation accuracy becomes a problem. For example, when 8 bits are input, 10 or 11 bits are required to transform the color space. Higher accuracy is required for an internal calculation, so that a stable color space can be obtained. Errors are accumulated in a result after an image is converted and compressed from the RGB color space and then extended to restore the image in the RGB color space even if a sufficient accuracy is applied to processes being repeated. Accordingly, a final color does not match the same as an original color. This is called color shift that occurs since the color space is unstable.

[0012] Methods are provided to realize a reversible color space transformation by an integer operation having predictable accuracy (for example, refer to IDS or Cross-References 1 and 2).

[0013] A color converting method for converting into a full color image at higher speed and lower cost after the image is compressed in a PEG format is disclosed (for example, refer to IDS or Cross-Reference 3). In this color converting method, the input color image is separated into a brightness element and a chrominance element, a color conversion number is obtained by using the chrominance element in which the brightness element is input and an output color space value output, a color conversion is conducted by applying the brightness element to a color converting function, and then an input color in a given color space is converted into an output color in another color space.

[0014] The IDS or Cross-References 1 and 2 discloses the reversible color conversion by the integer operation, in the reversible color conversion, an error is not accumulated even if a conversion and a reversed conversion are repeated, and then the color conversion is reversibly conducted at a predictable accuracy. Therefore, it is just a simple data conversion.

[0015] Moreover, in a case of IDS or Cross-References 3, the color converting process can be conducted at high speed, and an operation amount and cost can be reduced in the color converting process. Accordingly, a conversion accuracy can not be improved.

[0016] That is, in JPEG and JPEG 2000, as describe above, an image subject to be compressed is processed by YCbCr (Y:brightness, Cb:Black color difference, Cr:Red color difference) data. In addition, in generally, the image display and a print developing process are processed by RGB and YMC (or YMCK) Accordingly, compatibility for both RGB and YMC can be problem. In particular, in JPEG 2000, when the electronic watermark for preventing form manipulaton and the electronic watermark for encryption are embodied, it is required to loss any data even if the conversion and the reversible conversion are conducted, and maintain the compatibility of image data conversion. In particular, in JPEG 2000 where lossless compression and extension are available, RGB and YCbCr color conversion is a not-reversible conversion. St is retired for a basic color conversion disclosed in IDS or Cross-References 1 and 2 to guarantee the image quality,

[0017] In addition, not only the conversion for the color space, a problem concerning a length conversion of the image data can be raised. For example, in general, data in a personal computer is process in a mm unit system but data in a printer is processed in a inch unit system. Accordingly, if the reversibility in the conversion and the reversed conversion is displaced, a page location may be displaced.

[0018] [IDS or Cross-Reference 1]

[0019] Japanese Laid-Open Patent Application No. 9-6952

[0020] [IDS or Cross-Reference 2]

[0021] Japanese Laid-Open Patent Application No. 11-219428

[0022] [IDS or Cross-Reference 3]

[0023] Japanese Laid-Open Patent Application No. 2000-175061

SUMMARY OF THE INVENTION

[0024] It is a general object of the present invention to provide a method for reversibly transforming data format, an image processing apparatus, a program for reversibly transforming data format, and a computer-readable recording medium thereof, in which the above-mentioned problems are eliminated.

[0025] A more specific object of the present invention in to provide a a method for reversibly transforming data fort, an image processing apparatus, a program for reversibly transforming data format, and a computer-readable recording medium thereof, in which a color space transforming process, is conducted in a system where a lossless/lossy compression/extraction is conducted with respect to the image data in a color space.

[0026] The above objects of the present invention are achieved by a method for reversibly converting a data format in that a forward transformation and a backward transformation are reciprocally conducted for data between unit systems having different resolution levels, wherein, in the forward transformation and the backward transformation, a first unit system having a lower resolution level is used as a common unit system, and a reversible data conversion is conducted by an integer operation for data in the first unit system having the lower resolution level and data in a second unit system having a higher resolution level higher than the first unit system.

[0027] In the method, the first unit system is a first color space having the lower resolution level, and the second unit system is a second color space having the higher resolution level, wherein in a case in that a digital color conversion by quantizing the first color space having the lower resolution level and being analog, by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.

[0028] In the method, the, first data in the first color space are YCbCr data, and the second data in the second color space are RGB data, and the third data in the first color space are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, when the forward transformation is conducted from the RGB data to the Y′Cb′CR′ data, a first formula is conducted by an integer operation of a color converting functions where the first formula is defined as $\begin{matrix} {Y = {\left\lfloor \frac{\begin{matrix} {{219 \times \left( {{299 \times R} + {587 \times G} + {114 \times B}} \right)} +} \\ {{16 \times 255 \times 1000} + {255 \times {1000/2}}} \end{matrix}}{255 \times 1000} \right\rfloor }} \\ {{Cb} = \left\lfloor \frac{\begin{matrix} {{224 \times 564 \times \left( {{{- 229} \times R} - {587 \times G} + {886 \times B}} \right)} +} \\ {{128 \times 225 \times 1000 \times 1000} + {255 \times 1000 \times {1000/2}}} \end{matrix}}{255 \times 1000 \times 1000} \right\rfloor} \\ {{Cr} = \left\lfloor \frac{\begin{matrix} {{224 \times 713 \times \left( {{701 \times R} - {587 \times G} - {114 \times B}} \right)} +} \\ {{128 \times 225 \times 1000 \times 1000} + {255 \times 1000 \times {1000/2}}} \end{matrix}}{255 \times 1000 \times 1000} \right\rfloor} \\ {\quad {round}\quad a\quad {fractional}\quad {part}\quad {and}\quad {the}\quad {same}\quad {in}\quad {the}\quad {following}} \end{matrix}$

[0029] and when the backward transformation is conducted from the RGB data to the YCbCr data, a second formula is conducted by an integer operation of a color converting functions where the second formula is defined as $\begin{matrix} {R = \left\lfloor \frac{\begin{matrix} {\left\lbrack {{219 \times 1000 \times \left( {{Cr} - 128} \right)} + {713 \times 224 \times \left( {Y - 16} \right)}} \right\rbrack \times} \\ {255 + {713 \times 224 \times {219/2}}} \end{matrix}}{713 \times 224 \times 219} \right\rfloor} \\ {G = \left\lfloor \frac{\begin{matrix} {\begin{bmatrix} {{713 \times 224 \times 587 \times 564\left( {Y - 16} \right)} -} \\ {{229 \times 219 \times 564 \times 1000 \times \left( {{Cr} - 128} \right)} -} \\ {114 \times 219 \times 713 \times 1000 \times \left( {{Cb} - 128} \right)} \end{bmatrix} \times} \\ {255 + {219 \times 713 \times 224 \times 587 \times {564/2}}} \end{matrix}}{219 \times 713 \times 224 \times 587 \times 564} \right\rfloor} \\ {B = \left\lfloor \frac{\begin{matrix} {\left\lbrack {{219 \times 1000 \times \left( {{Cb} - 128} \right)} + {564 \times 224 \times \left( {Y - 16} \right)}} \right\rbrack \times} \\ {255 + {564 \times 224 \times {219/2}}} \end{matrix}}{564 \times 224 \times 219} \right\rfloor} \end{matrix}$

[0030] In the method, the first unit system is a first color space having the lower resolution level and the second unit system is a second color space having the higher resolution level, wherein in a case in that a digital color conversion by quantizing the first color space having the lower resolution level and being analog, by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.

[0031] In the method, the first data in the first color space are YCbCr data, and the second data in the second color space are RGB data, and the third data in the first color space are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, the forward transformation from the second data in the second color space to the third data in the first color space is conducted by an integer operation where MAX denotes a maximum value of the resolution level and Y, M, and C are set to be Y=MAX−B, M=MAX−G, and C=MAX−R in the first formula, and the backward transformation from the first data in the first color space to the second data in the second color space is conducted by an integer operation where MAX denotes a maximum value of the resolution level and Y, M, and C are set to be Y=MAX−B, M=MAX−G, and C=MAX−R in the second formula.

[0032] In the method, the first unit system is a color space having the lower resolution level and the second unit system is a second color space having the higher resolution level, wherein in a case of conducing a color conversion in accordance with an international standard in which the data format for converting an analog video signal into digital data is specified, by using the first color apace as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.

[0033] In the method, the first data in the first color space are YCbCr data, and the second data in the second color space are quantized R(d)G(d)B(d) data, and the third data in the first color space are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, in a conversion from an analog R(a)G(a)B(a) data to the YCbCr data, the forward transformation from the YCbCr data by conducting a color converting function in a third formula defined as $\begin{matrix} {Y = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{77 \times {R(a)}} + {150 \times {G(a)}} + {29 \times {B(a)}}} \right)} +} \\ {{16 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor} \\ {{C\quad b} = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{{- 44} \times {R(a)}} - {87 \times {G(a)}} + {131 \times {B(a)}}} \right)} +} \\ {{128 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor} \\ {{C\quad r} = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{131 \times {R(a)}} - {110 \times {G(a)}} - {21 \times {B(a)}}} \right)} +} \\ {{128 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor} \end{matrix}$

[0034] to the R(d)G(d)B(d) data is conducted by an integer operation of a color converting function in a fourth formula defined as $\begin{matrix} {{R(d)} = \left\lfloor \frac{\begin{matrix} \left( {{16772821 \times Y} + {22904709 \times {Cr}} - {41320 \times {Cb}} -} \right. \\ {{\left. 2926513792 \right) \times 2} + 16772821} \end{matrix}}{16772821 \times 2} \right\rfloor} \\ {{{G(d)} = \left\lfloor \frac{\begin{matrix} \left( {{470873 \times Y} - {329527 \times {Cr}} - {157064 \times {Cb}} +} \right. \\ {{\left. 62283648 \right) \times 2} + 470873} \end{matrix}}{470873 \times 2} \right\rfloor}\quad} \\ {{{B(d)} = \left\lfloor \frac{\begin{matrix} \left( {{16772821 \times Y} - {102267 \times {Cr}} + {29047960 \times {Cb}} -} \right. \\ {{\left. 3705048704 \right) \times 2} + 16772821} \end{matrix}}{16772821 \times 2} \right\rfloor}\quad} \end{matrix}$

[0035] and when the backward transformation is conducted from the R(d)G(d)B(d) data to the Y′Cb′Cr′ data, a fifth formula is conducted by an integer operation of a color converting functions where the second formula is defined an $\begin{matrix} {Y^{\prime} = \left\lfloor \frac{{77 \times {R(d)}} + {150 \times {G(d)}} + {29 \times {B(d)}} + 128}{256} \right\rfloor} \\ {{Cb}^{\prime} = \left\lfloor \frac{{{- 44} \times {R(d)}} - {87 \times {G(d)}} + {131 \times {B(d)}} + {128 \times 256} + 128}{256} \right\rfloor} \\ {{Cr}^{\prime} = \left\lfloor \frac{{131 \times {R(d)}} - {110 \times {G(d)}} - {21 \times {B(d)}} + {128 \times 256} + 128}{256} \right\rfloor} \end{matrix}$

[0036] In the method, the first unit system is a first color space having the lower resolution level, and the second unit system is a second color space having the higher resolution level, wherein in a case of conducting an original color based on the brightness and the color difference, by using the first color space as the common unit sys to, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color apace are conducted and the first data corresponds to the third data.

[0037] In the method, the first data in the first color space are Y(o)Cb(o)Cr(o) data, and the second data in the second color space are R(o)G(o)B(o) data, and the third data in the first color space are Y(o)′Cb(o)′Cr(o)′, and in a case of converting to the Y(o)′Cb(o)′Cr(o)′ data after the Y(o)Cb(o)Cr(o) data is converted into the R(o)G(o)B(o) data, when the forward transformation is conducted from the RGB data to the Y(o)′Cb(o)′CR(o)′ data, a sixth formula is conducted by an integer operation of a color converting functions where the sixth formula is defined as $\begin{matrix} {{Y(o)} = \left\lfloor \frac{{2 \times \left( {{x_{M} \times {R(o)}} + {\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} + {y_{M} \times {B(o)}}} \right)} + D}{2 \times D} \right\rfloor} \\ {{{Cb}(o)} = {\left\lfloor \frac{\begin{matrix} {{\left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor \times 2 \times \left( {D - y_{M}} \right)} - {x_{M} \times {R(o)}} -} \\ {{\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} + {\left( {D - y_{M}} \right) \times \left( {{B(o)} - 1} \right)}} \end{matrix}}{2 \times \left( {D - y_{M}} \right)} \right\rfloor -}} \\ {\quad \left\lfloor \frac{{MAX}_{ROB} + 1}{2} \right\rfloor} \\ {{{Cr}(o)} = {\left\lfloor \frac{\begin{matrix} {{\left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor \times 2 \times \left( {D - x_{M}} \right)} + {\left( {D - x_{M}} \right) \times \left( {{R(o)} + 1} \right)} -} \\ {{\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} - {y_{M} \times {B(o)}}} \end{matrix}}{2 \times \left( {D - x_{M}} \right)} \right\rfloor -}} \\ {\quad \left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor} \end{matrix}$

[0038] and when the backward transformation is conducted from the R(o)G(o)B(o) data to the Y(o)Cb(o)Cr(o) data, a seventh formula is conducted by an integer operation of a color converting functions where the seventh formula in defined as $\begin{matrix} {{R(o)} = \left\lfloor \frac{{2 \times \left( {{D \times {Y(o)}} + {2 \times \left( {D - x_{M}} \right) \times C\quad {r(o)}}} \right)} + D}{2 \times D} \right\rfloor} \\ {{G(o)} = \left\lfloor \frac{\begin{matrix} {2 \times \left( {{\left( {D - x_{M} - y_{M}} \right) \times D \times {Y(o)}} - {2 \times y_{M} \times \left( {D - y_{M}} \right) \times}} \right.} \\ {\left. {{{Cb}(o)} - {2 \times x_{M} \times \left( {D - x_{M}} \right) \times C\quad {r(o)}}} \right) + {\left( {D - x_{M} - y_{M}} \right) \times D}} \end{matrix}}{2 \times \left( {D - x_{M} - y_{M}} \right) \times D} \right\rfloor} \\ {{B(o)} = \left\lfloor \frac{{2 \times \left( {{D \times {Y(o)}} + {2 \times \left( {D - y_{M}} \right) \times {{Cb}(o)}}} \right)} + D}{2 \times D} \right\rfloor} \end{matrix}$

[0039] In the method as claimed in claim 9, wherein a color conversion for the original color based on the brightness and the color difference, the first data in the first color space are Y(o)Cb(o)Cr(o) data, and the second data in the second color space are R(o)G(o)B(o) data, and the third data in the first color space are Y(o)′Cb(o)′Cr(o)′, and in a case of converting to the Y(o)′Cb(o)′Cr(o)′ data after the Y(o)Cb(o)Cr(o) data is converted into the R(o)G(o)B(o) data, when the forward transformation is conducted from the RGB data to the Y(o)′Cb(o)′CR(o)′ data, an eighth formula is conducted by an integer operation of a color converting functions where the eighth formula is defined as $\begin{matrix} {{Y(o)} = \left\lfloor \frac{\left( {{299 \times {R(o)}} + {587 \times {G(o)}} + {114 \times {B(o)}}} \right) + 500}{1000} \right\rfloor} \\ {{{Cb}(o)} = {\left\lfloor \frac{\begin{matrix} {{128 \times 2 \times 886} - {229 \times {R(o)}} -} \\ {{587 \times G(o)} + {886 \times \left( {{B(o)} + 1} \right)}} \end{matrix}}{2 \times 886} \right\rfloor - 128}} \\ {{{Cr}(o)} = {\left\lfloor \frac{\begin{matrix} {{128 \times 2 \times 701} + {701 \times \left( {{R(o)} + 1} \right)} -} \\ {{587 \times {G(o)}} - {114 \times {B(o)}}} \end{matrix}}{2 \times 701} \right\rfloor - 128}} \end{matrix}$

[0040] and when the backward transformation is conducted from the R(o)G(o)B(o) data to the Y(o)Cb(o)Cr(o) data, a ninth formula is conducted by an integer operation of a color converting functions where the ninth formula is defined as $\begin{matrix} {{R(o)} = \left\lfloor \frac{\left( {{1000 \times {Y(o)}} + {1402 \times {{Cr}(o)}}} \right) + 500}{1000} \right\rfloor} \\ {{G(o)} = \left\lfloor \frac{\begin{matrix} \left( {{587 \times 1000 \times {Y(o)}} - {2 \times 114 \times 886 \times {{Cb}(o)}} -} \right. \\ {\left. {2 \times 299 \times 701 \times {{Cr}(o)}} \right) + {587 \times 500}} \end{matrix}}{587 \times 1000} \right\rfloor} \\ {{B(o)} = \left\lfloor \frac{\left( {{1000 \times {Y(o)}} + {1772 \times {{Cb}(o)}}} \right) + 500}{1000} \right\rfloor} \end{matrix}$

[0041] In the method, maximum values and minimum value are limited in available ranges for the R(o)G(o)B(o) data and the Y(o)Cb(o)Cr(o) data.

[0042] In the method, wherein the first unit system is a BMU unit system using an inch unit system and the second unit system is a {fraction (1/100)} mm unit system using a meter unit system, and by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.

[0043] In the method, after the first data shown in the BMU unit system is converted into the second data shown in the {fraction (1/100)} mm using the meter unit system, a tenth formula is conducted to convert to the third data showing the BMU unit system where the tenth formula is defined as

<{fraction (1/100)} mm data>=└(2540×<BMU data>+600)/1200┘

<BMU data>=└(1200×<{fraction (1/100)} mm data>+1270)/2540┘

[0044] In the method, the integer operation conducts the reversible conversion using powers of 2.

[0045] In the method, the forward transformation from the R(o)G(o)B(o) data to the Y(o)′Cb(o)′Cr(o)′ data is conducted by an eleventh formula using powers of 2 derived from the sixth formula where the eleventh formula is defined as $\begin{matrix} {{Y(o)} = {\left\lfloor \frac{\begin{matrix} {\left( {128 \times 2^{12}} \right) + {1225 \times {R(o)}} + {2404 \times}} \\ {{G(o)} + {467 \times {B(o)}} + 2^{11}} \end{matrix}}{2^{12}} \right\rfloor - 128}} \\ {{{Cb}(o)} = {\left\lfloor \frac{\begin{matrix} {\left( {128 \times 2^{12}} \right) - {691 \times {R(o)}} - {1357 \times}} \\ {{G(o)} + {2^{11} \times {B(o)}} + 2^{11}} \end{matrix}}{2^{12}} \right\rfloor - 128}} \\ {{{Cr}(o)} = {\left\lfloor \frac{\begin{matrix} {\left( {128 \times 2^{12}} \right) - {2^{11} \times {R(o)}} - {1715 \times}} \\ {{G(o)} - {333 \times {B(o)}} + 2^{11}} \end{matrix}}{2^{12}} \right\rfloor - 128}} \end{matrix}$

[0046] and the backward transformation from the Y(o)Cb(o)Cr(o) data to the R(o)G(o)B(o) data in conducted by a twelfth formula using powers of 2 derived from the seventh formula where the twelfth formula is defined as $\begin{matrix} {{R(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} + {5743 \times {{Cr}(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{G(o)} = {\frac{\begin{matrix} {\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} - {1410 \times}} \\ {{{Cb}(o)} - {2925 \times {{Cr}(o)}} + 2^{11}} \end{matrix}}{2^{12}} - 128}} \\ {{B(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} + {7258 \times {{Cb}(o)}} + 2^{11}}{2^{12}} - 128}} \end{matrix}$

[0047] In the method, the powers of 2 is conducted by bit shifts.

[0048] In the method, the forward transformation from the R(o)G(o)B(o) data to the Y(o)′Cb(o)′Cr(o)′ data is conducted by a thirteenth formula using powers of 2 derived from the sixth-formula where the thirteenth formula is defined as

Y(o)=(((128<<12)+1225×R(o)+2404×G(o)+467×B(o)+(1<<11))>>12)−128;

Cb(o)=(((128<<12)−691×R(o)−1357×G(o)+2048×B(o)+(1<<11))>>12)−128;

Cr(o)=(((128<<12)−2048×R(o)−1715×G(o)−333×B(o)+(1<<11))>>12)−128;

[0049] and the backward transformation from the Y(o)Cb(o)Cr(o) data to the R(o)G(o)B(o) data is conducted by a fourteenth formula using powers of 2 derived from the seventh formula where the fourteenth formula is defined as

R(o)=(((128<<12)+4096×Y(o)+5743×Cr(o)+(1<<11))>>12)−128;

G(o)=(((128<<12)+4096×Y(o)−1410×Cb(o)−2925×Cr(o)+(1<<11)))>>12)−128;

B(o)=(((128<<12)+4096×Y(o)+7258×Cb(o)+(1<<11))>>12)−128;

[0050] According to the present invention, in the forward transformation and the backward transformation, a unit system having a lower resolution revel is used as the common unit system and the data conversion is conducted by the integer operation between unit systems having different resolution levels, by using the common unit system. Therefore, a unit system having a higher resolution level is sufficiently processed and then it is possible to realize the reversible conversion where data can be perfectly restored.

[0051] In particular, regarding the digital color conversion using a quantization of analog Y, Cb, Cr signals between the unit system for the color space RGB and the unit system for the color space YCbCr, the unit system for the color space YCbCr having a lower resolution level is used as the common unit system. Thus, since the unit system for the color space RGB is sufficiently processed, it is possible to realize the reversible conversion in a color space where data can be perfectly restored.

[0052] Moreover, it is possible to realize the reversible conversion in the color space where data can be perfectly restored by a predetermined color converting function.

[0053] Furthermore, in a case in that a unit system for a print in such as a color space YMC is used, it is possible to realize the reversible conversion in the color space where data can be perfectly restored.

[0054] In particular, regarding the color conversion in accordance with the international standard specifying a data format for converting an analog video signal into the digital data between the unit system in the color space RGB and the unit system in the color space YCbCr, the color space YCbCr having a lower resolution level is used as the common unit system. Therefore, since the unit system in the color space RGB having a higher resolution level can be sufficiently processed, it is possible to realize the reversible conversion of the color space where data can be perfectly restored.

[0055] In particular, regarding the color conversion of the original color based on the brightness and the color difference between the unit system in the color space RGB and the unit system in the color space YCbCr, the color space YCbCr having a lower resolution level is used as the common unit system. Therefore, since the color space RGB having a higher resolution level can be sufficiently processed, it is possible to realize the reversible conversion in the color space where data can be perfectly restored.

[0056] Moreover, in the available ranges for R(o)G(o)B(o) data and Y(o)Cb(o)Cr(o) data, a limited range is provided in that a maximum value and a minimum value are limited. Therefore, without being out of the range of the color converting function, it is possible to conduct the compatible conversion where data can be perfectly restored.

[0057] In particular, regarding the length conversion between the BMU type data using an inch unit system and the {fraction (1/100)} mm type data using a meter unit system in the personal computer and the printer, the inch unit system for the EMU type data having a lower resolution level is used as the common unit system. Therefore, since the meter unit system for the {fraction (1/100)} mm type data having a higher resolution level can be sufficiently processed, it is possible to realize the reversible conversion where length data can be perfectly restored.

[0058] The above objects of the present invention can be achieved by an image processing apparatus that realizes the process in the method for reversibly transforming data format, by a program code for causing a computer to conduct processes described above in the method or by a computer-readable recording medium recorded with the program code. The image processing apparatus is not limited to a single function device such as a digital camera, a digital copier, and an MFP (Multi-Functional Printer) Alternatively, the image processing apparatus can have a system configuration of a server/client system or a like.

BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In the following, embodiments of the present invention will be described with reference to the accompanying drawings.

[0060]FIG. 1 is a diagram schematically showing a system configuration according to an embodiment of the present invention;

[0061]FIG. 2 is a diagram schematically illustrating an application to JPEG 2000;

[0062]FIG. 3 is a diagram schematically illustrating an application to a usage requiring &reversible color conversion;

[0063]FIG. 4 is a diagram schematically illustrating results of an analog type color conversion;

[0064]FIG. 5 is a diagram schematically illustrating results of a digital type color conversion; and

[0065]FIG. 6 is a diagram schematically showing results of the color conversion applied to JPEG 2000.

DESCRIPTION OF THE PREFERRED EMBODIMENT

[0066] In the following, an embodiment of the present invention according to a document processing apparatus will be described with reference to the accompanying drawings The present invention can be applied to various image processing systems and devices such an a color television broadcast, a digital video, a digital camera, a digital copier, an MFP (Multi-Functional Printer), various image processing application software for a personal computer, a printer, a scanner, and a like. For the sake of convenience, just the most essential part of the present invention is explained and shown in the accompanying drawings regarding the various image processing systems and image processing devices. In addition, a data format reversible converting method according to the present invention can be realized by a program which can be executable in these various image processing system and image processing devices, and various computer-readable recording media recording the program.

[0067] [System Configuration]

[0068] The present invention can be included in a compressing/extending system having a coding part and a decoding part that are provided to the image processing apparatus (any one of the various image processing system and image processing devices). FIG. 1 illustrates a system configuration according to the present invention. A coding part 1 encodes input data to generate compressed data (encoded data), and a decoding part 2 decodes the encoded data to generate original input data. In the coding part 1, a color space transformation 4 is conducted to convert a first color coordinate system into a second color coordinate system prior to a compression 5. Similarly, in the decoding part 2, a color space transformation 7 is conducted from the second coordinate system to the first coordinate system after an extension 6.

[0069] The input data for the compressing/expressing system may be an image (static image or dynamic image), graphics data, and data in other various data formats. In this case, the input data is digital signal data. Alternatively, data in other formats can be the input data. A source of the data may be based on a communication path or a memory for the coding part 1 and/or the decoding part 2. This system can be configured as a lossless compressing/extending system or to conduct a lossy compression/extension.

[0070] In addition, as described above, configuration factors of the coding part 1 and/or the decoding part 2 may be realized by hardware, software, or a combination of both hardware and software. The color space transformations 4 and 7 are realized as a data format lossless transforming part or that function, as follows.

[0071] [Application for Analog Type Compatible Color Transformation]

[0072] An example of an application to a digital color transformation by quantizing analog Y, Cb, and Cr signals (Y:brightness, Cb:B (Black) color difference, and Cr:R (Red) color difference) will be described ac cording to an embodiment of the present invention. In this case, regarding the digital color transformation by quantizing the analog Y, Cb, and Cr signals between an unit system in a color space RGB and an unit system in a color space YCbCr, the unit system of the color space YCbCr having a lower resolution is used as a common unit system to maintain a compatibility of an integer operation with the color space RGB. That is, between the unit system of the color space YCbCr having a lower resolution and the unit system of the color space RGB used for a display by using the unit system of the color space YCbCr, the following data conversion is conducted in an order of a backward transformation and a forward transformation:

[0073] YCbCr data->RGB data->Y′Cb′Cr data.

[0074] The data conversion is reversibly conducted by the integer operation so as to satisfy Y=Y′, Cb=Cb′, and Cr=Cr′. The inventors found a color converting function for conducting the forward transformation and another color converting function for conducting the backward transformation in the data conversion for conducting the backward transformation and the forward transformation to realize a YCbCr data->RGB data->Y′Cb′Cr data conversion. It should be noted that each of R, G, and B element values used in the embodiment is independent from each other and is one of values from 2 to 253 (expressed in 8 bits).

[0075] First, as an RGB data->YCbCr data conversion, the following color converting function can be applied to a digital color converting function quantizing the analog Y, Cb, and Cr signals cited in ITU-R BT.601 being an international standard that specifies a data format when an analog video signal specified for the color television broadcast or the like is converted into a digital data. Regarding the digital color converting function, a converting process is conventionally conducted by a real number operation shown in the following formula 15: $\begin{matrix} {\quad {\left\lbrack {{Formula}\quad 15} \right\rbrack {Y = {{219 \times \left\lbrack {{0.299 \times \frac{R}{255}} + {0.587 \times \frac{G}{255}} + {0.114 \times \frac{B}{255}}} \right\rbrack} + 16}}}} \\ {{C\quad b} = {{224 \times \left\lbrack {0.564 \times \left( {{{- 0.299} \times \frac{R}{255}} - {0.587 \times \frac{G}{255}} + {0.886 \times \frac{B}{255}}} \right)} \right\rbrack} + 128}} \\ {{C\quad r} = {{224 \times \left\lbrack {0.713 \times \left( {{0.701 \times \frac{R}{255}} - {0.587 \times \frac{G}{255}} - {0.114 \times \frac{B}{255}}} \right)} \right\rbrack} + 128}} \end{matrix}$

[0076] However, when the formula 15 is calculated by a computer, errors occur due to an overflow of an arithmetic operation. On the contrary, in this embodiment, for the RGB data->YCbCr data conversion, instead of using the formula 15, the following formula 16 is applied so as to conduct the RGB data->YCbCr data conversion by an integer operation: $\begin{matrix} \begin{matrix} {Y = {\left\lfloor \frac{\begin{matrix} {{219 \times \left( {{299 \times R} + {587 \times G} + {114 \times B}} \right)} +} \\ {{16 \times 255 \times 1000} + {255 \times {1000/2}}} \end{matrix}}{255 \times 1000} \right\rfloor }} \\ {{Cb} = \left\lfloor \frac{\begin{matrix} {{224 \times 564 \times \left( {{{- 229} \times R} - {587 \times G} + {886 \times B}} \right)} +} \\ {{128 \times 225 \times 1000 \times 1000} + {255 \times 1000 \times {1000/2}}} \end{matrix}}{255 \times 1000 \times 1000} \right\rfloor} \\ {{Cr} = \left\lfloor \frac{\begin{matrix} {{224 \times 713 \times \left( {{701 \times R} - {587 \times G} - {114 \times B}} \right)} +} \\ {{128 \times 225 \times 1000 \times 1000} + {255 \times 1000 \times {1000/2}}} \end{matrix}}{255 \times 1000 \times 1000} \right\rfloor} \\ {\quad {round}\quad a\quad {fractional}\quad {part}} \\ {\quad {{and}\quad {the}\quad {same}\quad {in}\quad {the}\quad {{following}.}}} \end{matrix} & \left\lbrack {{Formula}\quad 16} \right\rbrack \end{matrix}$

[0077] In the formula 16, an addition operation and a multiplication operation, which do not cause an error unless the overflow occurs, are conducted in an earlier step. A division operation, which easily cause the overflow and the error, is conducted in a latex step. In addition, after half denominator is added, a fractional part is rounded, so as to count fractions over ½ as one and disregarding the rest.

[0078] That is, in a Y data converting expression in the formula 16, after “255×1000/2” showing half the denominator is added to a numerator, the numerator is divided by the denominator “255×1000” and then a fractional part is rounded. In Cb and Cr data converting expressions in the formula 16, “255×1000/2” showing half a denominator is added to a numerator, a result from calculating the numerator is divided by the denominator “255×1000×1000”, and then a fractional part is rounded.

[0079] It is possible to conduct an arithmetic operation in accordance with the formula 16 by integers and to obtain an operation result by an integer value.

[0080] On the other hand, the digital color converting function, which is cited in the international standard ITU-R BT.601 and quantizes the analog Y, Cb, and Cr signals, can be applied to a YCbCr data<-RGB data conversion. Conventionally, a converting process by a real number operation shown in the following formula 17 is used: $\begin{matrix} {R = {\left\lbrack {\frac{{Cr} - 128}{0.713 \times 224} + \frac{Y - 16}{219}} \right\rbrack \times 255}} & \left\lbrack {{Formula}\quad 17} \right\rbrack \\ {G = {\begin{bmatrix} {\frac{Y - 16}{219} - \frac{0.299 \times \left( {{Cr} - 128} \right)}{0.713 \times 224 \times 0.587} -} \\ {\frac{0.114 \times \left( {{Cb} - 128} \right)}{0.564 \times 224 \times 0.587}\quad} \end{bmatrix} \times 255}} & \quad \\ {B = {\left\lbrack {\frac{{Cb} - 128}{0.564 \times 224} + \frac{Y - 16}{219}} \right\rbrack \times 255}} & \quad \end{matrix}$

[0081] However, when the formula 17 is calculated by a computer, errors occur due to an overflow of an arithmetic operation. On the contrary, in this embodiment, for the YCbCr data->RGB data conversion, instead of using the formula 17, the following formula 18 is applied so as to conduct the YCbCr data->RGB data conversion by an integer operation: $\begin{matrix} {R = \left\lfloor \frac{\begin{matrix} {\left\lbrack {{219 \times 1000 \times \left( {{Cr} - 128} \right)} + {713 \times 224 \times \left( {Y - 16} \right)}} \right\rbrack \times} \\ {255 + {713 \times 224 \times {219/2}}} \end{matrix}}{713 \times 224 \times 219} \right\rfloor} & \left\lbrack {{Formula}\quad 18} \right\rbrack \\ {G = \left\lfloor \frac{\begin{matrix} {\begin{bmatrix} {{713 \times 224 \times 587 \times 564\left( {Y - 16} \right)} -} \\ {{229 \times 219 \times 564 \times 1000 \times \left( {{Cr} - 128} \right)} -} \\ {114 \times 219 \times 713 \times 1000 \times \left( {{Cb} - 128} \right)} \end{bmatrix} \times} \\ {255 + {219 \times 713 \times 224 \times 587 \times {564/2}}} \end{matrix}}{219 \times 713 \times 224 \times 587 \times 564} \right\rfloor} & \quad \\ {B = \left\lfloor \frac{\begin{matrix} {\left\lbrack {{219 \times 1000 \times \left( {{Cb} - 128} \right)} + {564 \times 224 \times \left( {Y - 16} \right)}} \right\rbrack \times} \\ {255 + {564 \times 224 \times {219/2}}} \end{matrix}}{564 \times 224 \times 219} \right\rfloor} & \quad \end{matrix}$

[0082] In the formula 18, an addition operation and a multiplication operation, which do not cause an error unless the overflow occurs, are conducted in an earlier step. A division operation, which easily cause the overflow and the error, is conducted in a later step. In addition, after half denominator is added, a fractional part is rounded, so as to count fractions over ½ as one and disregarding the rest.

[0083] That is, in a R data converting expression in the formula 18, after “713×224×219/2” showing half the denominator is added to a numerator, the numerator is divided by the denominator “713×224×219” and then a fractional part is rounded. In a G data converting expression in the formula 18, “219×713×224×587×564/2” showing half a denominator is added to a numerator, a result from calculating the numerator is divided by the denominator “219×713×224×587×564”, and then a fractional part is rounded. In a B data converting expression in the formula 18, “564×224×219/2” showing half a denominator is added to a numerator, a result from calculating the numerator is divided by the denominator “564×224×219”, and then a fractional part is rounded.

[0084] It is possible to conduct an arithmetic operation in accordance with the formula 18 by integers and to obtain an operation result by an integer value.

[0085] As described above, in the YCbCr data->RGB data->Y′Cb′Cr′ data conversion, by using the color space YCbCr as the common unit system, the backward transformation at the YCbCr data->RGB data side is conducted by using the color converting expression shown by the formula 16, and the forward transformation at the RGB data->Y′Cb′Cr′ data side is conducted by using the color converting expression shown by the formula 18. Table 1 shows a color conversion results of the backward transformation by the formula 16 and the forward transformation by the formula 11. TABLE 1 (by formula 18) (by formula 16) YCbCr RGB restored → → data data YCbCr data example 1.  16 (Y)  0 (G)  16 (Y) 128 (Cb)  0 (B) 128 (Cb) 128 (Cr)  0 (R) 128 (Cr) example 2. 126 (Y) 128 (G) 126 (Y) 128 (Cb) 128 (B) 128 (Cb) 128 (Cr) 128 (R) 128 (Cr) example 3. 107 (Y)  16 (G) 107 (Y) 191 (Cb) 233 (B) 191 (Cb) 208 (Cr) 234 (R) 208 (Cr) example 4. 112 (Y) 112 (G) 112 (Y) 139 (Cb) 134 (B) 139 (Cb) 123 (Cr) 104 (R) 123 (Cr) example 5. 218 (Y) 235 (G) 218 (Y) 128 (Cb) 235 (B) 128 (Cb) 128 (Cr) 235 (R) 128 (Cr)

[0086] According to the color conversion result shown in Table 1, Y=Y′, Cb=Cb′, and Cr=Cr′ are maintained. Thus, it can be seen that a data compatibility (reversibility) concerning a color conversion is guaranteed.

[0087] [Example of Application to Color Space YMC Used for Print]

[0088] In the previous example, the application to the unit system of the color space RGB used for a display is described. Also, the present invention can be applied to a unit system of the color space YMC used for a print. In this case, Y, M, and C are set to be Y=MAX−B, M=MAX−G, and C=MAX−R in the formula 40 and the formula 42, so as to conduct the integer operation. MAX denotes a maximum, value of the resolution level. For example, it the maximum level is 256, MAX is set to be MAX=256.

[0089] [Example of Application to Digital Type Compatible Color Conversion]

[0090] Another application to a color conversion formula cited in the international standard ITT-R BT.601 as an example. In this case, the unit system of the color space YCbCr is used as the common unit system The data conversion of the backward transformation and the forward transformation shown as

[0091] YCbCr data->R(d)G(d)B(d) data->Y′Cb′Cr′ data

[0092] is conducted between the unit system of the color space YCbCr and the unit system of the color space RGB used for the display, to conduct the reversible data conversion by the integer operation so that Y=Y′Cb=Cb′, and Cr=Cr′ are satisfied. In the data conversion such as the YCbCr data->R(d)G(d)B(d) data->Y′Cb′Cr′ data conversion, the inventors found a color converting function for conducting an R(d)G(d)B(d) data->YCbCr data conversion, a color converting function for conducting a forward transformation of a YCbCr data<-R(d)G(d)B(d) data conversion, and a color converting function for conducting a backward transformation of an R(d)G(d)B(d) data->Y′Cb′Cr′ data conversion.

[0093] An original color converting function is a color converting function cited in the international standard ITU-R BT.601. In the following, conventional converting formulae will be described.

[0094] a. converting formula from analog RGB (R(a), G(a), B(a)) signals to quantized digital (R(d), G(d), B(d)) signals

[0095] where 0≦R(a)≦256, 0≦G(a)≦256, 0≦B(a)≦256,

R(d)=219*R(a)/256+16

G(d)=219*G(a)/256+16

B(d)=219*B(a)/256+16  [formula 19]

[0096] b. converting formula from the quantized digital (R(d), G(d), B(d)) signals to digital Y, Cb, Cr signals

Y=(77*R(d)/256)+(150*G(d)/256)+(29*B(d)/256)

Cb=−(44*R(d)/256)−(87*G(d)/256)+(131*B(d)/256)+128

Cr=(131*R(d)/256)−(110*G(d)/256)−(21*B(d)/256)+128  [formula 20]

[0097] Conventionally, the above formula 20 is used for a converting process. On the other hand, according to the present invention, the R(a)G(a)B(a) data->YCbCr data conversion is conducted by an operation in accordance with a color converting function shown by the following formula 21: $\begin{matrix} \begin{matrix} {Y = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{77 \times {R(a)}} + {150 \times {G(a)}} + {29 \times {B(a)}}} \right)} +} \\ {{16 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor} \\ {{C\quad b} = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{{- 44} \times {R(a)}} - {87 \times {G(a)}} + {131 \times {B(a)}}} \right)} +} \\ {{128 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor} \\ {{C\quad r} = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{131 \times {R(a)}} - {110 \times {G(a)}} - {21 \times {B(a)}}} \right)} +} \\ {{128 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor} \end{matrix} & \left\lbrack {{Formula}\quad 21} \right\rbrack \end{matrix}$

[0098] The YCbCr data->R(d)G(d)B(d) data conversion is conducted by an integer operation in accordance with a color converting function shown by the following formula 22: $\begin{matrix} \begin{matrix} {{R(d)} = \left\lfloor \frac{\begin{matrix} \left( {{16772821 \times Y} + {22904709 \times {Cr}} -} \right. \\ {{\left. {{41320 \times {Cb}} - 2926513792} \right) \times 2} + 16772821} \end{matrix}}{16772821 \times 2} \right\rfloor} \\ {{{G(d)} = \left\lfloor \frac{\begin{matrix} \left( {{470873 \times Y} - {329527 \times {Cr}} - {157064 \times {Cb}} +} \right. \\ {{\left. 62283648 \right) \times 2} + 470873} \end{matrix}}{470873 \times 2} \right\rfloor}\quad} \\ {{{B(d)} = \left\lfloor \frac{\begin{matrix} \left( {{16772821 \times Y} - {102267 \times {Cr}} + {29047960 \times}} \right. \\ {{\left. {{Cb} - 3705048704} \right) \times 2} + 16772821} \end{matrix}}{16772821 \times 2} \right\rfloor}\quad} \end{matrix} & \left\lbrack {{Formula}\quad 22} \right\rbrack \end{matrix}$

[0099] The R(d)G(d)B(d) data->Y′Cb′Cr′ data conversion is conducted by an integer operation in accordance with a color converting function shown by the following formula 23: $\begin{matrix} \begin{matrix} {Y^{\prime} = \left\lfloor \frac{{77 \times {R(d)}} + {150 \times {G(d)}} + {29 \times {B(d)}} + 128}{256} \right\rfloor} \\ {{Cb}^{\prime} = \left\lfloor \frac{\begin{matrix} {{{- 44} \times {R(d)}} - {87 \times {G(d)}} +} \\ {{131 \times B(d)} + {128 \times 256} + 128} \end{matrix}}{256} \right\rfloor} \\ {{Cr}^{\prime} = \left\lfloor \frac{\begin{matrix} {{131 \times {R(d)}} - {110 \times {G(d)}} -} \\ {{21 \times B(d)} + {128 \times 256} + 128} \end{matrix}}{256} \right\rfloor} \end{matrix} & \left\lbrack {{Formula}\quad 23} \right\rbrack \end{matrix}$

[0100] Accordingly, by using the color space YCbCr as the common unit system, for the data conversion of the backward transformation and the forward transformation of the YCbCr data->R(d)G(d)B(d) data->Y′Cb′Cr′ data conversion, the R(a)G(a)B(a) data->YCbCr data conversion is conducted by using the color converting function shown by the formula 21, the YCbCr data->R(d)G(d)B(d) data conversion is conducted by using the color converting function shown by the formula 22, and the R(d)G(d)B(d) data->Y′Cb′Cr′ data conversion is conducted by using the color converting function shown by the formula 23. Table 2 shows color conversion results from the formulae 21, 22, and 23. TABLE 2 (by formula 22) (by formula 23) YCbCr R(d)G(d)B(d) restored → → data data YCbCr data example 1.  16 (Y)  16 (G)  16 (Y) 128 (Cb)  16 (B) 128 (Cb) 128 (Cr)  16 (R) 128 (Cr) example 2. 128 (Y) 128 (G) 128 (Y) 128 (Cb) 128 (B) 128 (Cb) 128 (Cr) 128 (R) 128 (Cr) example 3. 106 (Y)  16 (G) 106 (Y) 202 (Cb) 234 (B) 202 (Cb) 222 (Cr) 234 (R) 222 (Cr) example 4. 112 (Y) 112 (G) 112 (Y) 139 (Cb) 131 (B) 139 (Cb) 123 (Cr) 105 (R) 123 (Cr) example 5. 235 (Y) 235 (G) 235 (Y) 128 (Cb) 235 (B) 128 (Cb) 128 (Cr) 235 (R) 128 (Cr)

[0101] According to the color conversion results shown in the Table 2, the YCbCr data are restored. That is, Y=Y′, Cb=Cb′, and Cr=Cr′ are maintained so that the data compatibility (reversibility) concerning the color conversion can be guaranteed.

[0102] [Application to Original Color Converting Function Bing Based on Brightness and Color Difference: JPEG 2000]

[0103] In a JPEG 2000 algorithm, a color space converting process is conducted by converting the RGB data into the YCbCr data being based on the brightness and color difference or conducting the backward transformation However, this color space converting process can not be reversible as described in Description of the Related Art.

[0104] A. That is, as the color converting function of the conventional JPEG algorithm,

[0105] a. conversion from RGB (R(0) G(0), B(0) signals to YCbCr (Y(o), Cb(o), Cr(o)) signals

[0106] The following converting formula shown in formula 24 is used for the forwarding transformation: $\begin{matrix} {\begin{bmatrix} \begin{matrix} {Y(o)} \\ {{Cb}(o)} \end{matrix} \\ {{Cr}(o)} \end{bmatrix} = {A\begin{bmatrix} \begin{matrix} {R(o)} \\ {G(o)} \end{matrix} \\ {B(o)} \end{bmatrix}}} & \left\lbrack {{Formula}\quad 24} \right\rbrack \end{matrix}$

[0107] A matrix denoted by a letter A in the formula 24 is described as follows: $\begin{matrix} {{A = \begin{bmatrix} x & {1 - x - y} & y \\ {- \frac{x}{2\left( {1 - y} \right)}} & {- \frac{1 - x - y}{2\left( {1 - y} \right)}} & \frac{1}{2} \\ \frac{1}{2} & {- \frac{1 - x - y}{2\left( {1 - x} \right)}} & {- \frac{y}{2\left( {1 - x} \right)}} \end{bmatrix}},} & \left\lbrack {{Formula}\quad 25} \right\rbrack \\ {A^{- 1} = \begin{bmatrix} 1 & 0 & {2\left( {1 - x} \right)} \\ 1 & {- \frac{2{y\left( {1 - y} \right)}}{1 - x - y}} & {- \frac{2{x\left( {1 - x} \right)}}{1 - x - y}} \\ 1 & {2\left( {1 - y} \right)} & 0 \end{bmatrix}} & \quad \\ {{A} = \frac{1 - x - y}{4\left( {1 - x} \right)\left( {1 - y} \right)}} & \quad \end{matrix}$

[0108] In the formula 25, x denotes a weighted coefficient of a red color, y denotes a weighted coefficient of a blue color, and 1-x-y denotes a weighted coefficient of a green color (where 0≦x<1. 0≦y<1, and x+y<1).

[0109] b. conversion from YCbCr (Y(0), Cb(0), Cr(0) signals to RGB (R(0), G(0), B(0)) signals

[0110] The following formula 26 is used for the backward transformation: $\begin{matrix} {\begin{bmatrix} {R(o)} \\ {G(o)} \\ {B(o)} \end{bmatrix} = {A^{- 1}\begin{bmatrix} {Y(o)} \\ {{Cb}(o)} \\ {{Cr}(o)} \end{bmatrix}}} & \left\lbrack {{Formula}\quad 26} \right\rbrack \end{matrix}$

[0111] A matrix denoted by a letter A in the formula 26 is the same matrix shown by the formula 25.

[0112] The matrix A shown by the formula 25 will be described in detail. When x=299/1000=weighted coefficient of the red color, Y=114/1000=weighted coefficient of the blue color, and 1-x-y=587/1000=weighted coefficient of the green color, the matrix A is expressed as follows: $\begin{matrix} \begin{matrix} {{A \approx \begin{bmatrix} 0.299 & 0.587 & \left. 0.114 \right\rbrack \\ {- 0.16874} & {- 0.33126} & 0.5 \\ 0.5 & {- 0.41869} & {- 0.08131} \end{bmatrix}},} \\ {A^{- 1} \approx \begin{bmatrix} 1 & 0 & 1.402 \\ 1 & {- 0.34414} & {- 0.71414} \\ 1 & 1.772 & 0 \end{bmatrix}} \end{matrix} & \left\lbrack {{Formula}\quad 27} \right\rbrack \end{matrix}$

[0113] The matrix A is a converting matrix conventionally used as non-reversible color conversion in the JPEG 2000.

[0114] B. on the other hand, in the embodiment according to the present invention, similar to the previous applications, it is possible to conduct a reversible conversion by integer values for the color conversion in the JPEG 2000 algorithm. Thus, it is possible to obtain all variables and all coefficients and to obtain an operation result by an integer.

[0115] When x indicating the weighted coefficient of the red color, y indicating the weighted coefficient of the blue color, and 1-x-y indicating the weighted coefficient of the green color are expressed by x=x_(M)/D and y=y_(M)/D (where x_(M), y_(M), and D are all integers, and an index M is simply a part of a variable name, for example, the index M is used to distinguish “x” from “x_(M)”), x_(M), y_(M) and D are expressed under limitations of x and y concerning the formula 25 described above as follows:

0≦x_(M)<D, 0≦y_(M)<D, and x _(M) +y _(M) <D.  [Formula 28]

[0116] In this case, by using coefficients concerning a matrix, the color converting process is conducted as follows. It should be noted that “(o)” of R(o), G(o), B(o), Y(o), Cb(o), and Cr(o) is additionally provided to distinguish from the variable names far general R, G, B, Y, Cb, and Cr used in other converting formulae described above, in order for conversion data in this case according to the present invention to indicate “original color being based on the brightness and the color difference”. Thus, “(o)” is simply a part of a variable name.

[0117] a. conversion from RGB (R(0), G(0), B(0)) signals to YCbCr (Y (o), Cb (a), Cr (o)) signals

[0118] A color converting function show in the following formula 29 is conducted by the integer operation for the forward transformation. $\begin{matrix} \begin{matrix} {{Y(o)} = \left\lfloor \frac{{2 \times \left( {{x_{M} \times {R(o)}} + {\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} + {y_{M} \times {B(o)}}} \right)} + D}{2 \times D} \right\rfloor} \\ {{{Cb}(o)} = {\left\lfloor \frac{{\left\lfloor \frac{{Max}_{RGB} + 1}{2} \right\rfloor \times 2 \times \left( {D - y_{M}} \right)} - {x_{M} \times {R(o)}} - {\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} + {\left( {D - y_{M}} \right) \times \left( {{B(o)} + 1} \right)}}{2 \times \left( {D - y_{M}} \right)} \right\rfloor +}} \\ {\quad \left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor} \\ {{{Cr}(o)} = {\left\lfloor \frac{{\left\lfloor \frac{{Max}_{RGB} + 1}{2} \right\rfloor \times 2 \times \left( {D - x_{M}} \right)} + {\left( {D - x_{M}} \right) \times \left( {{R(o)} + 1} \right)} - {\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} - {y_{M} \times {B(o)}}}{2 \times \left( {D - x_{M}} \right)} \right\rfloor -}} \\ {\quad \left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor} \end{matrix} & \left\lbrack {{Formula}\quad 29} \right\rbrack \end{matrix}$

[0119] When MAX_(RGB) denotes a level number (integer) and a first limitation concerning input R(o), G(o), B(o) data, which are used to realize reversibility and compatibility described later in the converting process is eliminated, R(o), G(o), and B(o) are expressed as follows:

0≦R(o)≦MAX_(RGB)−1, 0≦G(o) G≦MAX_(RGB)−1,

0 ≦B(o)≦MAX_(RGB)−1.  [Formula 30]

[0120] For example, when x=299/1000=weighted coefficient of the red color, y=114/1000=weighted coefficient of the blue color, 1-x-y=587/1000 weighted coefficient of the green color, and MAX_(RGB)=256 levels in order to meet the JPEG algorithm, the formula 29 concerning the RGB (R(o), G(o), B(o)) signals->YCbCr (Y(o), Cb(o), Cr(0)) signals conversion can be replaced with the following color converting function shown in formula 31: $\begin{matrix} \begin{matrix} {{Y(o)} = \left\lfloor \frac{\left( {{299 \times {R(o)}} + {587 \times {G(o)}} + {114 \times {B(o)}}} \right) + 500}{1000} \right\rfloor} \\ {{{Cb}(o)} = {\left\lfloor \frac{{128 \times 2 \times 886} - {299 \times {R(o)}} - {587 \times {G(o)}} + {886 \times \left( {{B(o)} + 1} \right)}}{2 \times 886} \right\rfloor - 128}} \\ {{{Cr}(o)} = {\left\lfloor \frac{{128 \times 2 \times 701} + {701 \times \left( {{R(o)} + 1} \right)} - {587 \times {G(o)}} - {114 \times {B(o)}}}{2 \times 701} \right\rfloor - 128}} \end{matrix} & \left\lbrack {{Formula}\quad 31} \right\rbrack \end{matrix}$

[0121] By combining the formula 31 and formula 38 described later, it is possible to improve the color converting function, which is known as not-reversible in the JPEG 2000 algorithm to be a reversible color converting function.

[0122] In addition, by applying a bit shift to the color converting function shown by the formula 31, it is possible to improve an operation speed. For example, since the level number of the RGB is 256 and an available range is from 0 to 255, the formula 31 can be expressed in C language where MAX_KAICHO=155 as a maximum level value, bitSHIFT=12 (the number of bit shifts) as exponents of powers of 2, iR0RS, iG0RS, and iB0RS denote R(o) G(o), and B(o), and iY0RS, iCbRS, and iCrRS denote Y(o), Cb(o), and Cr(o). [Formula 32] iY0RS=((MAX_KAICHO+1)/2*1000 + 299*iR0RS+587*iG0RS+114*   iB0RS + 500)/(1000) − (MAX_KAICHO+1)/2   ≈(       (         ((MAX_KAICHO+1)/2 << bitSHIFT)         + ((299<<bitSHIFT)+500)/1000*iR0RS         + ((587<<bitSHIFT)+500)/1000*iG0RS         + ((114<<bitSHIFT)+500)/1000*iB0RS         + (1 << (bitSHIFT−1))       ) >> bitSHIFT     ) − (MAX_KAICHO+1)/2; iCbRS=((MAX_KAICHO+1)/2*2*886−299*iR0RS−587*iG0RS+(886)   *(iB0RS+1))/(2*886) − (MAX_KAICHO+1)/2   ≈(       (         ((MAX_KAICHO+1)/2 << bitSHIFT)         − ((299<<bitSHIFT)+886)/(2*886)*iR0RS         − ((587<<bitSHIFT)+886)/(2*886)*iG0RS         + ((886<<bitSHIFT)+886)/(2*886)*iB0RS         + (1 << (bitSHIFT−1))         ) >> bitSHIFT       ) − (MAX_KAICHO+1)/2; iCrRS=((MAX_KAICHO+1)/2*2*701−114*iB0RS−587*iG0RS+(701)   *(iR0RS+1))/(2*701) − (MAX_KAICHO+1)/2   ≈(       (         ((MAX_KAICHO+1)/2 << bitSHIFT)         + ((701<<bitSHIFT)+701)/(2*701)*iR0RS         − ((587<<bitSHIFT)+701)/(2*701)*iG0RS         − ((587<<bitSHIFT)+701)/(2*701)*iG0RS         + (1 << (bitSHIFT−1))       ) >> bitSHIFT     ) − (MAX_KAICHO+1)/2;

[0123] The formula 32 can be simply expressed as follows:

iY0RS=((1225*iR0RS+2404*iG0RS+467*iB0RS+(257<<11))>>12)−128,

iCbRS=((−691*iR0RS−1357*iG0RS+((iB0RS+257)<<11))>>12)−128;

iCrRS=((((iR0RS+257)<<11)−1715*iG0RS−333*iB0RS)>>12)−128;  [Formula 33]

[0124] The formula 33 can be further simplified as follows;

iY0RS=(((128<<12)+1225×iR0RS+2404×iG0RS+467×iB0RS+(1<<11))>>12)−128;

iCbRS=(((128<<12)−691×iR0RS−1357×iG0RS+2048×iG0RS+(1<<11))>>12)−128;

iCrRS=(((128<<12)−2048×iR0RS−1715×iG0RS−333×iB0RS+(1<<11))>>12)−128;  [Formula 34]

[0125] In addition, the formula 34 can be expressed by using powers of 2 as follows: $\begin{matrix} \begin{matrix} {{Y(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {1225 \times {R(o)}} + {2404 \times {G(o)}} + {467 \times {B(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{{Cb}(o)} = {\frac{\left( {128 \times 2^{12}} \right) - {691 \times {R(o)}} - {1357 \times {G(o)}} + {2^{11} \times {B(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{{Cr}(o)} = {\frac{\left( {128 \times 2^{12}} \right) - {2^{11} \times {R(o)}} - {1715 \times {G(o)}} - {333 \times {B(o)}} + 2^{11}}{2^{12}} - 128}} \end{matrix} & \left\lbrack {{Formula}\quad 35} \right\rbrack \end{matrix}$

[0126] Regarding this color conversion, an available range of the input R(o)G(o)B(o) data is limited to realize the reversibility and the compatibility. That is, the available range of the input R(o)G(o)B(o) data inputted in the formula 29 is limited as follows:

1≦R(o)≦MAX_(RGB)−2,

1≦G(o)≦MAX_(RGB)−2, and

1≦B(o)≦MAX_(RGB)−2.  [Formula 36]

[0127] It is required to change values being out of boundary values to be the boundary values. If a value being out of we boundary value is input and the backward transformation is conducted in accordance with the formula 38, a result from the formula 29 described above may be out of the available range (limitation range). In this case, a problem occurs in that Y(o), Cb(o), and Cr(o) data can not be restored.

[0128] In a case of restoring original Y(o)Cb(o)Cr(o) data, as the available range (limitation range) of the input R(o)G(o)B(o) data, the R(o)G(o)B(o) data being already obtained are used for formula 38 described later. And in a case of simply restoring Y(o)Cb(o)Cr(o) data, there is no special limitation, and restored Y(o)Cb(o)Cr(o) data can be obtained by using the R(o)G(o)B(o) data obtained from the following formula 37 describe later as the input data for the above converting formula.

[0129] b. compatible conversion from integer values of the Y(o)Cb(o)Cr(o) data to integer values of the R(o)G(o)B(o) data

[0130] The backward transforming can be conducted by an integer operation of a color converting function shown by the following formula 37: $\begin{matrix} \begin{matrix} {{R(o)} = \left\lfloor \frac{{2 \times \left( {{D \times {Y(o)}} + {2 \times \left( {D - x_{M}} \right) \times {{Cr}(o)}}} \right)} + D}{2 \times D} \right\rfloor} \\ {{G(o)} = \left\lfloor \frac{\left( {{2 \times \left( {{\left( {D - x_{M} - y_{M}} \right) \times D \times {Y(o)}} - {2 \times y_{M} \times \left( {D - y_{M}} \right) \times {{Cb}(o)}} - {2 \times x_{M} \times \left( {D - x_{M}} \right) \times {{Cr}(o)}}} \right)} + {\left( {D - x_{M} - y_{M}} \right) \times D}} \right.}{2 \times \left( {D - x_{M} - y_{M}} \right) \times D} \right\rfloor} \\ {{B(o)} = \left\lfloor \frac{{2 \times \left( {{D \times {Y(o)}} + {2 \times \left( {D - y_{M}} \right) \times {{Cb}(o)}}} \right)} + D}{2 \times D} \right\rfloor} \end{matrix} & \left\lbrack {{Formula}\quad 37} \right\rbrack \end{matrix}$

[0131] For example, similar to the formula 31, in accordance with the JPEG 2000 algorithm, when x=299/1000=weighted coefficient of the red color, y=114/1000=weighted coefficient of the blue color, 1-x-y=587/1000=weighted coefficient of the green color, and MAX_(RGB)=256 levels, the formula 61 concerning the Y(o)Cb(o)Cf(o) data->R(o)G(o)B(o) data conversion can be replaced with a color converting function shown by the following formula 38: $\begin{matrix} \begin{matrix} {{R(o)} = \left\lfloor \frac{\left( {{1000 \times {Y(o)}} + {1402 \times {{Cr}(o)}}} \right) + 500}{1000} \right\rfloor} \\ {{G(o)} = \left\lfloor \frac{\left( {{587 \times 1000 \times {Y(o)}} - {2 \times 114 \times 886 \times {{Cb}(o)}} - {2 \times 299 \times 701 \times {{Cr}(o)}}} \right) + {587 \times 500}}{587 \times 1000} \right\rfloor} \\ {{B(o)} = \left\lfloor \frac{\left( {{1000 \times {Y(o)}} + {1772 \times {{Cb}(o)}}} \right) + 500}{1000} \right\rfloor} \end{matrix} & \left\lbrack {{Formula}\quad 38} \right\rbrack \end{matrix}$

[0132] In addition, by applying a bit shift to the color converting function shown by the formula 38, it is possible to improve an operation speed. For example, since the level number of the RGB is 256 and an available range is from 0 to 255, the formula 31 can be expressed in C language where MAX_KAICHO=155 as a maximum level value, bitSHIFT=12 (the number of bit shifts) as exponents of powers of 2, iR0RS, iG0RS, and iB0RS, denote R(o), G(o), and B(o), and iY0RS, iCbRS, and iCrRS denote Y(o), Cb(o), and Cr(o). [Formula 39] iR0RS=((MAX_KAICHO+1)/2*1000 + 1000*iY0S+2*701*iCrS + 500)/ (1000)     − (MAX_KAICHO+1)/2     ≈(         (           ((MAX_KAICHO+1)/2 << bitSHIFT)           + ((1000<<bitSHIFT)+500)/1000*iY0S           + ((2*701<<bitSHIFT)+500)/1000*iCrS           + (1 << (bitSHIFT−1))         ) >> bitSHIFT       ) − (MAX_KAICHO+1)/2; iG0RS=(       (MAX_KAICHO+1)/2*(2*587*1000)           + 2*(587*1000*iY0S−2*114*886*iCbS−2*299*             701*iCrS) + 587*1000     ) / (2*587*1000)     − (MAX_KAICHO+1)/2   ≈(       ((MAX_KAICHO+1)/2 << bitSHIFT)     + ((2*587*1000/4<<bitSHIFT)+587*1000/4)/(2*587*1000/4)*     iY0S         − ((114*886<<bitSHIFT)+587*1000/4)/(2*587*         1000/4)*iCbS         − ((299*701<<bitSHIFT)+587*1000/4)/(2*587*         1000/4)*iCrS         + (1 << (bitSHIFT−1))       ) >> bitSHIFT     ) − (MAX_KAICHO+1)/2; iB0RS=((MAX_KAICHO+1)/2*1000 + 1000*iY0S+2*886*iCbS + 500)/ (1000)     − (MAX_KAICHO+1)/2   ≈(       (         ((MAX_KAICHO+1)/2 << bitSHIFT)         + ((1000<<bitSHIFT)+500)/1000*iY0S         + ((2*886<<bitSHIFT)+500)/1000*iCbS         + (1 << (bitSHIFT−1))       ) >> bitSHIFT     ) − (MAX_KAICHO+1)/2;

[0133] The formula 39 can be simplified as follows:

iR0RS=((((257+(iY0S<<1))<<11)+5743*iCrS)>>12)−128;

iG0RS=((((257+(iY0S<<1))<<11)−1410*iCbS−2925*iCrS)>>12)−128;

iB0RS=((((257+(iY0S<<1))<<11)+7258*iCbS)>>12)−128;  [Formula 40]

[0134] The formula 40 can be further simplified as follows:

iR0RS=(((128<<12)+4096×iY0S+5743×iCrS+(1<<11))>>12)−128;

iG0RS=(((128<<12)+4096×iY0S)−1410×iCbS−2925×iCrS+(1<<11))>>12)−128;

iB0RS=(((128<<12)+4096×iL0S+7258×iCbS+(1<<11))>>12)−128;  [Formula 41]

[0135] The formula 41 can be expressed by using powers of 2 as follows: $\begin{matrix} \begin{matrix} {{R(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} + {5743 \times {{Cr}(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{G(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} - {1410 \times {{Cb}(o)}} - {2925 \times {{Cr}(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{B(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} + {7258 \times {{Cb}(o)}} + 2^{11}}{2^{12}} - 128}} \end{matrix} & \left\lbrack {{Formula}\quad 42} \right\rbrack \end{matrix}$

[0136] In order to realize the reversibility and the compatibility by operations in accordance with the above-described converting formulae, it is required to limit an available range of the input Y(o)Cb(o)Cr(o) data. First, it is assumed that the input Y(o)Cb(o)Cr(o) data are the Y(o)Cb(o)Cr(o) data obtained by the formula 29 described above. In order for Y(o)″Cb(o)″Cr(o)″ data in which an editorial process such as an image modification, an electronic watermark, or a like is additionally provided to the Y(o)Cb(o)Cr(o) data to be effective, based on a maximum displacement difference with respect to an original value, a boundary value is changed to be within an allowance range in the R(o)G(o)G(o) data, which are original for the Y(o)Cb(o)Cr(o) data, beforehand.

[0137] In the following, in order to prevent image data from being out of the boundary value by the image modification, a method for changing the boundary value to be within the allowance range before the image modification will be described. Each influence degree of ΔY, ΔCb, and ΔCr of Y(o), Cb(o), and Cr(o) with respect to the R(o)G(o)B(o) data is shown by each of the following ratios:

[0138] ΔR:ΔY:ΔCr=1:1:(2(D−X _(M))/D)

[0139] ΔG:ΔY:ΔCr:ΔCb=1:1:(2x _(M)(D−x _(M))/((D−x _(M) −y _(M))*D)): (2y _(M)(D−y _(M))/((D−x _(M) −y _(M))*D))

[0140] ΔB:ΔY:ΔCb=1:1:(2(D−y _(M))/D)

[0141] For example, when D=1000, x_(M)=299, and y_(M)=114,

[0142] ΔR:ΔY:ΔCr 1:1:1.40,

[0143] ΔG:ΔY:ΔCr:ΔCb≈:1:0.71:0.34,

[0144] ΔB:ΔY:ΔCb≈1:1:1.77.

[0145] For example, with respect to G data, a change in increments of ΔY=1, ΔCb=1, and ΔCr=1 becomes a displacement of 2.05(=1+0.34+0.71). Thus, in a case of MAX_(RGB)=256 levels, before the editorial process is started, an allowance range of the green color is changed to 4≦G≦251. Accordingly, even if the displacement is newly added, it is possible to suppress within an original allowance range 1≦G≦254.

[0146] By using the R(o)G(o)B(o) data where the change concerning the boundary values is conducted as described above, Y(o), Cb(o), and Cr(o) are calculated in accordance with the converting formula shown by the formula 29. Even if the displacement within the allowance range is applied to each of the calculated Y(o), Cb(o), and Cr(o) and the RGB conversion is conducted in accordance with the converting formula shown by the formula 37, it is possible to restore the Y(o)Cb(o)Cr(o) data where the displacement of the allowance range is applied.

[0147] These conversions are connected to be a

[0148] Y(o)Cb(o)Cr(o)->R(o)G(o)B(o)->Y(o)′Cb(o)′Cr(o)′ data conversion. Therefore, it is possible to restore the Y(o)Cb(o)Cr(o) data. That is, Y(o)′Cb(o)′Cr(o)′=Y(o)Cb(o)Cr(o) can be realized.

[0149] In detail, in a case of x_(M)=114, D=1000, and MAX_(RGB)=256, the color conversion can be conducted as follows:

[0150] (1) allowance range of an original RGB to generate Y(o)Cb(o)Cr(o): input of the converting formula shown by the formula 29

[0151] 1≦R(o)≦254, 1≦G(o)≦254, 1≦B(o)≦254.

[0152] (2) conversion result range of Y(o)Cb(o)Cr(o) generated in the allowance range shown in the above (1) input of the converting formula shown by the formula 37

[0153] 1≦Y(o)≦254, −126≦Cb(o)≦127, −126≦Cr(o)≦127.

[0154] (3) conversion result range of the RGB generated by the converting formula shown by the formula 37 in the conversion result range shown in the above (2): input of the converting formula shown by the formula 29

[0155] 1≦R(o)≦255, 1≦G(o)≦255, 1≦B(o)≦255.

[0156] (4) conversion result range of the Y(o)Cb(o)Cr(o) restored by the converting formula shown by the formula 29 in the conversion result range shown in the above (3)

[0157] 1≦Y(o)≦254, −126≦Cb(o)≦127, −126≦Cr(o)≦127.

[0158] Table 3 shows color conversion results from the color converting function. TABLE 3 YCbCr R(o)G(o)B(o) restored → → data data YCbCr data example 1.    1 (Y)  1 (G)    1 (Y)    0 (Cb)  1 (B)    0 (Cb)    0 (Cr)  1 (R)    0 (Cr) example 2.   128 (Y) 128 (G)   128 (Y)    0 (Cb) 128 (B)    0 (Cb)    0 (Cr) 128 (R)    0 (Cr) example 3.   105 (Y)  0 (G)   105 (Y)    84 (Cb) 254 (B)    84 (Cb)   106 (Cr) 254 (R)   106 (Cr) example 4.   112 (Y) 112 (G)   112 (Y)    11 (Cb) 131 (B)    11 (Cb)  −5 (Cr) 105 (R)  −5 (Cr) example 5.   254 (Y) 254 (G)   254 (Y)    0 (Cb) 254 (B)    0 (Cb)    0 (Cr) 254 (R)    0 (Cr)

[0159] According to the color conversion results, the YCbCr data are restored, that is, Y=Y′, Cb=Cb′, and Cr=Cr′ are maintained. Therefore, it can be wean that it is possible to guarantee the data compatibility (reversibility) concerning the color conversion.

[0160] As a result, for example, even if a color conversion is generally defined as a non-reversible transforming process in the JPEG 2000 algorithm schematically shown in FIG. 2, it is possible to change the reversible color conversion, it is possible to change the color conversion to be reversible by applying the embodiment of the present invention. FIG. 2 illustrates a compressing/extending system similar to FIG. 1. In FIG. 2, in a compression system, after the RGB->YCbCr conversion is conducted by the forward transformation of the color space having minimum error, the lossless compressing process such as a wavelet conversion, an entropy coding, or a like is conducted, and then encoded data are stored in a memory and an external storage device or distributed through a communication path such as the Internet. In an extension system, the encoded data are read from the memory or provided through the communication path, and the encoded data by being compressed are reversibly extended in a reverse procedure. Consequently, the YCbCr->RGB conversion is conducted by the backward transformation of, the color space having the minimum error is conducted so as to recover image data from the encoded data.

[0161] The reversible transformation can be realized by applying the color conversion described above to the forward and backward transformation of the color space having the minimum error. Therefore, even in JPEG 2000 algorithm, the color conversion can be the reversible transformation, and an image quality can be guaranteed. Also, an analog type compatible color converting algorithm and a digital type compatible color converting algorithm can be realized.

[0162] In the following, a usage requiring the reversible color conversion will be described with reference to FIG. 3, as an application example in a case in that an editorial process such as a manipulation or a like.

[0163] (1) First, a procedure for generating 4:2:2 YCbCr data from RGB based data will be described. The procedure realizes a perfect restored YCbCr data conversion of 4:2:2 YCbCr->RGB->4:2:2 YCbCr conversion

[0164] When R0G0B0 and R1G1B1 are assumed as two pixels being adjacent each other as the RGB based data, Cb and Cr are calculated by using the color converting function shown by the formula 18 based on R=(R0+R1)/2, G=(G0+G1)/2, and B=(B0+B1)/2. Y0 and Y1 are calculated by the color converting function shown by the formula 18 by the color converting function shown by the formula 18 by using R0G0B0 and R1G1B1, respectively.

[0165] R0G0B0 and R1G1B1 are recalculated by conducting the backward transformation based on Y0, Y1, Cb, and Cr calculated above. If each of the recalculated R0G0B0 and R1G1B1 is not greater than or equal to 0 and less than or equal to 255, Y0 and Y1 are recalculated based on the above R, G, and B (each average of R0G0B0 and R1G1B1).

[0166] (2) Next, input (arbitrary) 4:2:2 YCbCr based data->RGB->4:2:2 perfect recovered YCbCr data conversion is realized. A procedure for changing input 4:2:2 YCbCr based data will be described.

[0167] R, G, and B can be arbitrary values independently from each other within a range 0≦R, G, B≦255. However, in addition to applying limitations of 16≦Y≦235, 16≦Cb≦240, and 16≦Cr≦240 to the YCbCr data, another condition is applied in that when R, G, and B are calculated from Y, Cb, and Cr, it is not effective if the conversion results of R, G, and B are not within ranges 0≦R, G, B≦255. Therefore, first, by using YCbCr->RGB converting expression by the color converting function shown by the formula 22 to the input 4:2:2 YCbCr based data, R0G0B0 and R1G1B1 of the RGB based data described above (1) are calculated. In this case, when each calculation result becomes out of the boundary value (0,255), the calculation result is changed to be the boundary value.

[0168] Therefore since R0G0B0 and R1G1B1 become values being in the boundary values, the 4:2:2 YCbCr, in which R0G0B0 and R1G1B1 are applied to a method described the above (1) and calculated, becomes the perfect reversible YCbCr. A stable value for the color conversion described in FIG. 3 is a value having reversibility in that an original value is restored when the backward transformation is further conducted to a value where the color conversion is conducted.

[0169] (3) Next, a method for guaranteeing 4:2:2 YCbCR based data->RGB->4:2:2 perfect restored YCbCr data conversion where the editorial process (image modification, electronic watermark, or a like) is conducted will be described.

[0170] R0G0B0 and R1G1B1 of the RGB based data described above (1) are calculated by using the YCbCr->RGB conversion shown by the formula 18 for the 4:2:2 YCbCr based data before the editorial process is conducted. When each conversion result becomes out of the boundary value, the conversion result is changed to be the boundary value. In this case, an influence to an image value by the editorial process (image modification) is considered. Based on a maximum displacement difference with respect to a based value, the boundary values of R0G0B0 and R1G1B1 are changed to be within an allowance range.

[0171] A method for changing the boundary values into the allowance range before the image modification is conducted, in that even if the image modification is conducted, image data is not out of the boundary value. An influence degree of each of displacement values ΔY, ΔCb, and ΔCr of Y Cb Cr with respect to R0G0B0 and R1G1B1 is expressed as following ratio:

[0172] ΔR:ΔY:ΔCr≈1:1.17:1.60

[0173] ΔG:ΔY:ΔCr:ΔCb≈1:1.17:0.82:0.40

[0174] ΔB:ΔY:ΔCb≈1:1.17:2.02

[0175] For example, a change in increments of ΔY=1, ΔCb=1, and ΔCr=1 for G data becomes a displacement of 2.39 (=1.17+0.82+0.40) and influences. Accordingly, if an allowance for the G data is changed to 3≦G≦252 before the editorial process is started, the G data can be set not to be out of the original allowance range of 0≦G≦255 even if the displacement is newly added.

[0176] By using the R0G0B0 and R1G1B1 where the allowance for the G data is changed, 4:2:2 YCbCr is calculated by the method described in the above (1) Even ifs the color conversion is conducted by adding the displacement to the allowable range to the calculated 4:2:2 YCbCr, the 4:2:2 YCbCR data where the displacement of the allowable range is added can be restored.

[0177] [Reversible Color Conversion Using Bit Shifts]

[0178] Next, a reversible color conversion (YCbCr->RGB->YCbCr) using bit shifts will be described. A process of an original RGB->YCbCr->RGB->Y′Cb′Cr′->R′G′B′ conversion will be described in the following.

[0179] TCbCr (iY0S,iCbS,iCrS)=Y′Cb′Cr′ (iY0RS,iCbRS,iCrRS) is realized, that is, iY0S=iY0RS, iCbS=iCbRS, and iCrS=iCrRS are realized. In this case, RGB=R′G′B′ is realized.

[0180] The original RGB data within ranges 0≦R, G, B≦255 are converted into ranges 0≦Y≦255, −128≦Cb≦128, and −128≦Cr≦128 by the YCbCR conversion, converted into ranges −1≦R, G, B≦256 by the RGB conversion, and converted into ranges 0≦Y′≦255, −128Cb′≦128, and −128≦Cr′≦128 by the Y′Cb′Cr′ conversion.

[0181] On the other hand, as for a stipulated range of an effective color that can be presented by 8 bits/color, for RGB type color, the following ranges are defined:

[0182] 0≦R≦255, 0≦G≦255, and 0≦B≦−255.

[0183] and for YCbCr type color, the following ranges are defined:

[0184] 0≦Y≦255, −128≦Cb≦+127, and −128≦Cr≦+127.

[0185] In these stipulated ranges, data ranges effective to reversibly convert are ranges 1≦R, G, B≦254 for the original image RGB, ranges 1≦Y≦254, 126≦Cb≦127, and −126≦Cr≦127 for the YCbCR conversion, ranges 0≦R, G, B≦255 for the RGB conversion, and ranges 1≦Y′≦254, −126≦Cb′≦127, and −126≦Cr′≦127 for the Y′Cb′Cr′ conversion.

[0186] That is, the original image RGB within the ranges 1≦R, G, B≦254 can be reversibly converted.

[0187] However, the original image RGB when R, G, or B=0 or R, G, B=255, YCbCR and RGB may be out of the stipulated ranges, respectively in the original RGB->YCbCr->RGB->Y′Cb′Cr′->R′G′B′ conversion. For example, there are one case of Cb=128 or one case of Cr=128, and many cases of R, G, B=(−1) or 256.

[0188] The RGB->YCbCr conversion is conducted after values of the original image RGB are changed to be in 1 to 254, respectively, so as that conversion results can be within the stipulated range. For example, a conversion table for converting into a predetermined value may be prepared.

[0189] Next, a memory capacity for maintaining the conversion table will be described by considering the boundary values during the converting process, with respect to the following state A, state B, and state C.

[0190] State A

[0191] The boundaries (Y<0 or 254≦Y, Cb≦−127 or 127<Cb,Cr≦≦127 or 127<Cr) of the original image RGB->YCbCr conversion are concerned. Cases of invalid data being out of the stipulated range are shown as follows. [Formula 43] Y < 0 0 case/(256 × 256 × 256) color = 0% Y > 255 0 case/(256 × 256 × 256) color = 0% Cb < −128 0 case/(256 × 256 × 256) color = 0% Cb > 127 1 case/(256 × 256 × 256) color ≈ 6 × 10⁻⁶% Cr < −128 0 case/(256 × 256 × 256) color = 0% Cr > 127 1 case/(256 × 256 × 256) color ≈ 6 × 10⁻⁶%

[0192] State B

[0193] Only the YCbCr->RGB conversion is conducted (no compensating process is conducted). Then, similar to the above state A, the boundary values of the RGB are considered and cases of the invalid data being out of the stipulated range are considered as follows.

[0194] R<0:11,783 cases/(256×256×256)colors≈0.07%

[0195] R<255:11,883 cases/(256×256×256)colors≈0.07%

[0196] G<0:6,171 cases/(256×256×256)colors≈0.04%

[0197] G<255:6,117 cases/(256×256×256)colors≈0.04%

[0198] B<0:14,408 cases/(256×256×256)colors≈0.09%

[0199] B<255:14,529 cases/(256×256×256)colors≈0.09%

[0200] Accordingly, total 64,890 cases/(256×256×256)colors≈0.39% become the invalid data.

[0201] State C

[0202] The compensating process is conducted when the YCbCr->RGB conversion Similar to the above the states A and B, the boundary values of the RGB are considered, and cases of the invalid data being out of the stipulated range and change methods for these cases are considered. Table 4 shows results. TABLE 4 found when Y found found out of change calcu- when Cb when Cr boundary value method lation calculation calculation total R < 0 change  0 (case)    7 (case) 1,118 (case) 1,125 to R = 0 R > 255 R = 255  1    7 1,115 1,123 G < 0 G = 0  70    4   83 157 G > 255 G = 255  67    4   81 152 B < 0 B = 0  10 2,714   10 2,734 B > 255 B = 255  10 2,720   10 2,740 total 158 5,456 2,417 8,031

[0203] As shown in the table 4, in the state C, total 8,031 cases become the invalid data.

[0204] For data which can not be reversibly converted to be with in the stipulated range by the bit shifts in accordance with the formula 34 and the formula 40, in a case of using the conversion table as an exception, instead of applying the conversion table to the state B (64,891 cases), it is effective to apply the conversion table to the state C (8,031 cases). Accordingly, it is possible to reduce the memory capacity for maintaining the conversion table in the state C to be one eighth the memory capacity in the state B.

[0205] As described above, by applying the conversion table to the state C (8,031 cases), it is possible to realized the reversible conversion for 16,000,000 colors including the following examples 1 to 5 shown in table 3.

[0206] [Details]

[0207]FIG. 4 schematically shows the conversion results of a case in that arbitrary values in 0 to 255 are input for the RGB based data when the analog type color conversion using the formula 16 and the formula 18 is applied (R=104, G=112, and B=134). As a result, Y=Y′, Cb=Cb′, and Cr=Cr′ are realized.

[0208] In a case in that arbitrary values in 0 to 255 are input for the R based data when the digital type color conversion is conducted in accordance with ITU-R BT.601 using the formula 21 and the formula 23 (R=104, G=112, and B=134), the conversion results are schematically shown in FIG. 5. As a result, Y=Y′, Cb=Cb′, Cr=Cr′, R=R′, G=G′, B=B′ are realized.

[0209] In a case in that arbitrary values in 1 to 254 are input for the RGB based data when the reversible color conversion is conducted in accordance with the JPEG 2000 using the formula 31 and the formula 37 (R=1, G=254, and B=254), the conversion results are schematically shown in FIG. 6 by comparing with a conventional not-reversible conversion as comparative information. While the convention not-reversible conversion is in a not-restored state, in a case of applying the present invention, Y=Y′, Cb=Cb′ and Cr=Cf′, R′=R′, G′=G′, and B′=B′ are restored.

[0210] [Variation]

[0211] In the above explanation, only the color conversion is focused, In general, the present invention can be applied to a reversible data conversion in that the forward transformation and the backward transformation reciprocally convert data between unit systems having different resolution levels, a first unit system having a lower resolution revel is used as the common unit system when the forward transformation and the backward transformation are conducted, the integer operation is conducted between data in the first unit system having the lower resolution level and data in a second unit system having a higher resolution level being higher than that of the first unit system.

[0212] In the following, it will be described that a perfect reversible conversion can be realized by a successive conversion of the first unit system having the lower resolution level->the second unit system having the higher resolution level->the first unit system having the lower resolution level.

[0213] Two resolution levels α and β (where α>β>0. For example, in a case of mm<- ->BMU conversion, one inch is expressed by a unit system expressed by α=540:{fraction (1/100)} mm unit and another unit system expressed by β=1200 BMU) are assumed. After data are converted by transforming a β unit system to an α unit system, the converted data are further converted by converting to be back to the β unit system In a case in that this conversion is connected by the following relationship: $\begin{matrix} \begin{matrix} \left. \beta\rightarrow{\alpha \quad {converting}\quad {function}\quad \left( {{argument}\text{:}\quad \beta \quad {data}} \right)} \right. \\ \left. \quad {= {{{L\left( {2\alpha \times \left( {\beta \quad {data}} \right)\underset{\_}{+ \beta}} \right)}/2}\beta}} \right\rfloor \\ \left. \quad\downarrow \right. \\ {{round}\quad {up}\quad {if}\quad 5\quad {or}\quad {greater}\quad {and}\quad {round}\quad {down}\quad {if}\quad {less}\quad {than}\quad 5} \\ \left. \alpha\rightarrow{\beta \quad {converting}\quad {function}\quad \left( {{argument}\text{:}\quad \alpha \quad {data}} \right)} \right. \\ \left. \quad {= {{{L\left( {2\beta \times \left( {\alpha \quad {data}} \right)\underset{\_}{+ \alpha}} \right)}/2}\alpha}} \right\rfloor \\ \left. \quad\downarrow \right. \\ {{round}\quad {up}\quad {if}\quad 5\quad {or}\quad {greater}\quad {and}\quad {round}\quad {down}\quad {if}\quad {less}\quad {than}\quad 5} \end{matrix} & \left\lbrack {{Formula}\quad 44} \right\rbrack \end{matrix}$

[0214] the following relationship is obtained.

[0215] α×(β data)/β−0.5

[0216] including numbers after the decimal point: rational number

[0217] <β->α converting function (argument: β data)

[0218] integer according to the above definition

[0219] ≦α×(β data)/β+0.5

[0220] including numbers after the decimal point: rational number

[0221] <α×(β data)/β−0.5

[0222] including numbers after the decimal point: rational number

[0223] <β->α converting function (argument: β data+1)

[0224] integer according to the above definition

[0225] ≦α×(β data+1)/β+0.5

[0226] including numbers after the decimal point: rational number.

[0227] Since the β->α converting function (argument: β data+1)−β->α converting function (argument: β data)>α/β−1>0, even after data adjacent to original β data (an integer incremented or decremented by 1 and an original integer), there is not duplicated data and (β data)−1

[0228] <(β data)−0.5×β/α−0.5

[0229] <β×β->α converting function (argument: β data/α−0.5

[0230] <α->β converting function (argument: β->α converting function (argument: β data)

[0231] ≦β×β->α converting function (argument: β data)/α+0.5

[0232] ≦(β data)+0.5×β/α+0.5

[0233] <(β data)+1.

[0234] That is, since α->β converting function showing an integer value (argument: β->α converting function (argument: β data))=(β data) can be obtained, the original β data can be perfectly restored.

[0235] As a result, in a case in that by using the second unit system of BMU as the common unit system, when between the first unit system of {fraction (1/100)} mm and the second unit system, the data conversion of

[0236] BMU data->{fraction (1/100)} mm data->BMU data

[0237] is conducted, the reversible conversion is conducted by the integer operation so that the BMU data are always identical, In order to realize this reversible conversion, an integer operation in accordance with the following formula

<{fraction (1/100)} mm data>=L(2540×<BMU data>+600)/1200┘

<BMU data>=L(1200×<{fraction (1/100)} mm data>+1270)/2540┘

[0238] is conducted.

[0239] Calculations of powers of 2 in the formula 45 can be changed to bit shifts, so that it is possible to improve a calculation speed. [Formula 47] (1/100mm data) = ( L((2540<<bitSHIFT)+600)/1200┘ × (BMU data)+(1<<(bitSHIFT−1)) )>>bitSHIFT; (BMU data) = ( L((1200<<(bitSHIFT)+1270)/2540┘×(1/100 mm data)+ (1<<(bitSHIFT−1)))>>bitSHIFT;

[0240] In the formula 47, since underlined parts are fixed values, the underlined parts are calculated beforehand. Therefore, it is possible to calculate at higher speed. Moreover, in a case of the number of bit shifts (bitSHIFT)=12, it is possible to convert without any error in a range of 0≦(BMU data)≦2400.

[0241] Accordingly, in particular, for a conversion from the BMU data using an inch unit (inch, yard, foot, or a like) and a meter unit using {fraction (1/100)} mm data between a unit used in a personal computer and another unit used in a printer, by using the BMU data having the lower resolution as the common unit system, the {fraction (1/100)} mm data having the higher resolution can be sufficiently guaranteed. Therefore, it is possible to realize the reversible conversion for length data that can be perfectly restored.

[0242] Color conversion results obtained by using the converting function are shown in table 5. TABLE 5 BMU 1/100 mm restored → → data data BMU data example 1.   0 BMU   0 (1/100 mm)   0 BMU example 2.   1   2   1 example 3.   2   4   2 example 4.   5  11   5 example 5.  65  138  65 example 6.  66  140  66 example 7.  666 1410  666 example 8. 1199 2538 1199 example 9. 1200 2540 1200

[0243] According to the color conversion results, the BMU data is restored and the data compatibility (reversibility) concerning a length conversion can be guaranteed.

[0244] In the following, a color conversion (YCbCr->RGB=>YCbCr) method for further guaranteeing the reversibility will be described.

[0245] [Color Conversion (YCbCr->RGB=>YCbCr) Method for Further Guaranteeing The Reversibility]

[0246] (1) Preparation

[0247] (1-A) Expression of a Process for Rounding Down Fractional Part

[0248] In general, a division process for dividing positive fixed point data by different positive fixed point data in a computer rounds down the fractional part. In mathematics, a result from rounding down the fractional part of a real number A is expressed by putting the real number A in Gaussian symbols. Accordingly, the division result of the fixed point data by the computer is shown by using a modulo (showing a remainder of the division and shown by “mod”) as follows. $\begin{matrix} {\left\lfloor \frac{V}{U} \right\rfloor = \frac{V - {V\quad {mod}\quad U}}{U}} & \left\lbrack {{Formula}\quad 48} \right\rbrack \end{matrix}$

[0249] In the formula 41, a result from dividing fixed point data V by fixed point data U by the computer is expressed.

[0250] (1-B) Expression of a Process for Rounding Up if 5 or Greater and Rounding Down if Less Than 5

[0251] Similar to the above (1-A), a result from rounding up if 5 or greater and rounding down if less than 5 is shown as follows, in a division result from dividing positive fixed data Y by positive fixed data x (Y/X) by the computer. $\begin{matrix} {\left\lfloor \frac{{2Y} + X}{2X} \right\rfloor = \frac{{2Y} + X - {\left( {{2Y} + X} \right){{mod}\left( {2X} \right)}}}{2X}} & \left\lbrack {{Formula}\quad 49} \right\rbrack \end{matrix}$

[0252] (1-C) Expression of a Process for Rounding Up if 6 or Greater and Rounding Down if Less Than 6

[0253] Moreover, in the formula 49, a result from rounding up if 6 or greater and rounding down if less than 6 is shown as follows, in a division result from dividing positive fixed data Z by positive fixed data W (Z/W) by the computer. $\begin{matrix} {\left\lfloor \frac{{2Z} + W - 1}{2W} \right\rfloor = \frac{{2Z} + W - 1 - {\left( {{2Z} + W - 1} \right){{mod}\left( {2W} \right)}}}{2W}} & \left\lbrack {{Formula}\quad 50} \right\rbrack \end{matrix}$

[0254] Based on explanations in the above (1-A), (1-B), and (1-C), a color converting method for further guaranteeing the reversibility will be described in the following. That is, a color conversion at one side is conducted by rounding up if 5 or greater and rounding down if less than 5, and another color conversion at another side (opposite direction of the color conversion) is conducted by rounding up if 6 or greater and rounding down if less than 6, so that the reversibility can be perfectly guaranteed.

[0255] (2) Method for Perfectly Restoring Data by a Successive Conversion of a Lower Resolution Level->a Higher Resolution Level->a Lower Resolution Level

[0256] Two resolution levels α and β are defined. A unit system is converted from a β unit system to an α unit system and the converted unit system is further converted by using data in the converted unit system to be back to the β unit system (where α>β>0). In this ease of the mm<- ->BMU conversion, one inch is expressed in the resolution level α2540:{fraction (1/100)} mm unit or the resolution level β=1200 BMU unit. $\begin{matrix} \left. \beta\rightarrow{\alpha \quad {converting}\quad {function}\quad \left( {{argument}\text{:}\quad \beta \quad {data}} \right)} \right. & \left\lbrack {{Formula}\quad 51} \right\rbrack \\ \left. \quad {= {{\left\lfloor {\left( {2\quad \alpha \times \beta \quad {data}} \right)\underset{\underset{\downarrow}{\_}}{+ \beta}} \right)/2}\beta}} \right\rfloor & \quad \\ {\quad {{round}\quad {up}\quad {if}\quad 5\quad {or}\quad {greater}}\quad} & \quad \\ {\quad {{and}\quad {round}\quad {down}\quad {if}\quad {less}\quad {than}\quad 5}\quad} & \quad \\ {\quad {= \frac{{2\quad {\alpha \left( {\beta \quad {data}} \right)}} + \beta - {\left( {{2{\alpha \left( {\beta \quad {data}} \right)}} + \beta} \right){mod}\quad \left( {2\beta} \right)}}{2\quad \beta}}} & \quad \\ \left. \alpha\rightarrow{\beta \quad {converting}\quad {function}\quad \left( {{argument}\text{:}\quad \alpha \quad {data}} \right)} \right. & \quad \\ {\quad {= \left\lfloor {{\left( {2\quad \beta \times \left( {\alpha \quad {data}} \right)\underset{\underset{\downarrow}{\_}}{{+ \alpha} - 1}} \right)/2}\alpha} \right\rfloor}} & \quad \\ {\quad {{round}\quad {up}\quad {if}\quad 6\quad {or}\quad {greater}}\quad} & \quad \\ {\quad {{and}\quad {round}\quad {down}\quad {if}\quad {less}\quad {than}\quad 6}} & \quad \\ {\quad {= \frac{\begin{matrix} {{2\quad {\beta \left( {\alpha \quad {data}} \right)}} + \alpha - 1 -} \\ {\left( {{2{\beta \left( {\alpha \quad {data}} \right)}} + \alpha - 1} \right){mod}\quad \left( {2\alpha} \right)} \end{matrix}}{2\quad \alpha}}} & \quad \end{matrix}$

[0257] In a case in that a relationship shown in the above formula 51 is satisfied, when

[0258] [Formula 52]

[0259] α→β converting function (argument: β→α converting function (argument: β data)) $\begin{matrix} \left. \alpha\rightarrow{\beta \quad {converting}\quad {function}\quad \left( {{argument}\text{:}\quad \beta}\quad\rightarrow\alpha \right.} \right. & \left\lbrack {{Formula}\quad 52} \right\rbrack \\ \left. \quad {{converting}\quad {function}\quad \left( {{argument}\text{:}\quad \beta \quad {data}} \right)} \right) & \quad \\ {\quad {= \frac{{2\quad {\beta \left( {\alpha \quad {data}} \right)}} + \alpha - 1 - {\left( {{2\quad {\beta \left( {\alpha \quad {data}} \right)}} + \alpha - 1} \right){{mod}\left( {2\quad \alpha} \right)}}}{2\quad \alpha}}} & \quad \\ {= \frac{\begin{pmatrix} {{2\quad {\beta \left( \frac{{2\quad {\alpha (\beta)}} + \beta - {\left( {{2\quad {\alpha (\beta)}} + \beta} \right){{mod}\left( {2\quad \beta} \right)}}}{2\quad \beta} \right)}} + \alpha -} \\ {1 - \left( {{2{\beta \left( \frac{{2\quad {\alpha (\beta)}} + \beta - {\left( {{2\quad {\alpha (\beta)}} + \beta} \right){{mod}\left( {2\quad \beta} \right)}}}{2\quad \beta} \right)}} +} \right.} \\ {\left. {\alpha - 1} \right){{mod}\left( {2\alpha} \right)}} \end{pmatrix}}{2\alpha}} & \quad \\ {= \frac{\begin{pmatrix} {{2\quad {\alpha (\beta)}} + \beta - {\left( {{2\quad {\alpha (\beta)}} + \beta} \right){{mod}\left( {2\quad \beta} \right)}} + \alpha - 1 -} \\ \begin{matrix} \left( {{2\quad {\alpha (\beta)}} + \beta - {\left( {{2\quad {\alpha (\beta)}} + \beta} \right){{mod}\left( {2\quad \beta} \right)}} + \alpha - 1} \right) \\ {{mod}\left( {2\alpha} \right)} \end{matrix} \end{pmatrix}}{2\alpha}} & \quad \\ {= \frac{\begin{pmatrix} {{2\quad {\alpha (\beta)}} + \beta - {\left( {{2\quad {\alpha (\beta)}} + \beta} \right){{mod}\left( {2\quad \beta} \right)}} + \alpha - 1 -} \\ \begin{matrix} \left( {{2\quad {\alpha (\beta)}} + \beta - {\left( {{2\quad {\alpha (\beta)}} + \beta} \right){{mod}\left( {2\quad \beta} \right)}} + \alpha - 1} \right) \\ {{mod}\left( {2\alpha} \right)} \end{matrix} \end{pmatrix}}{2\alpha}} & \quad \\ {= {\left( {\beta \quad {data}} \right) + \frac{\beta + \alpha - 1 - \left( {O \sim \left( {{2\beta} - 1} \right)} \right) - \left( {O \sim \left( {{2\alpha} - 1} \right)} \right)}{2\quad \alpha}}} & \quad \\ {= {\left( {\beta \quad {data}} \right) + {F\left( {\alpha,\beta} \right)}}} & \quad \end{matrix}$

[0260] the following formula 53 is obtained. $\begin{matrix} {{- 1} < \frac{- \left( {\alpha + \beta - 1} \right)}{2\alpha} \leq {F\left( {\alpha,\beta} \right)} \leq \frac{\left( {\alpha + \beta - 1} \right)}{2\alpha} < 1} & \left\lbrack {{Formula}\quad 53} \right\rbrack \end{matrix}$

[0261] Therefore, since a result of the above calculations is obtained by an integer, this method can be expressed by using F(α, β).

[0262] That is, since the α->β converting function (argument: α->β converting function (argument: β data))=(β data) showing the integer value, it is possible to perfectly restore original β data and it is possible to guarantee the perfect restore even if α=β.

[0263] (3) Color Converting Method for Guaranteeing the Reversibility

[0264] (3-A) Color Converting Expression Capable of Re-Display (Precise Equation by a Rational Expression)

[0265] Based on the above [Application to Original color converting function Bing Based on Brightness and Color Difference JPEG 2000], an original color conversion can be expressed by a precise equation using rational numbers.

[0266] A YCbCr->RGB->YCbCr converting expression is described as follow: $\begin{matrix} {\begin{bmatrix} \begin{matrix} R \\ G \end{matrix} \\ B \end{bmatrix} = {{{A^{- 1}\begin{bmatrix} \begin{matrix} Y \\ {Cb} \end{matrix} \\ {Cr} \end{bmatrix}}\quad\begin{bmatrix} \begin{matrix} Y^{\prime} \\ {Cb}^{\prime} \end{matrix} \\ {Cr}^{\prime} \end{bmatrix}}\quad = {A\begin{bmatrix} \begin{matrix} R \\ G \end{matrix} \\ B \end{bmatrix}}}} & \left\lbrack {{Formula}\quad 54} \right\rbrack \end{matrix}$

[0267] In the formula 54, a matrix is denoted by a letter A and is expressed as follows. $\begin{matrix} \begin{matrix} {{A = \begin{bmatrix} x & {1 - x - y} & y \\ {- \frac{x}{2\left( {1 - y} \right)}} & {- \frac{1 - x - y}{2\left( {1 - y} \right)}} & \frac{1}{2} \\ \frac{1}{2} & {- \frac{1 - x - y}{2\left( {1 - x} \right)}} & {- \frac{y}{2\left( {1 - x} \right)}} \end{bmatrix}},} \\ {A^{- 1} = \begin{bmatrix} 1 & 0 & {2\left( {1 - x} \right)} \\ 1 & {- \frac{2{y\left( {1 - y} \right)}}{1 - x - y}} & {- \frac{2{x\left( {1 - x} \right)}}{1 - x - y}} \\ 1 & {2\left( {1 - y} \right)} & 0 \end{bmatrix}} \end{matrix} & \left\lbrack {{Formula}\quad 55} \right\rbrack \end{matrix}$

[0268] Accordingly, the reversibility can be guaranteed,

[0269] (3-B) Color Converting Expression by Integers (Fixed Point Calculation)

[0270] (a) YCbCr->RGB conversion where calculation of rounding up if 6 or greater and rounding down if less than 6

[0271] Based on the formula 54 and the formula 55 shown in the above (3-A), by applying the formula 52 shown in the above (3-C), RGB can be expressed by YCbCr as follows. $\begin{matrix} {R = {Y + \frac{\begin{matrix} {{4\left( {D - x} \right){Cr}} + D - 1 -} \\ {\left( {{4\left( {D - x} \right){Cr}} + D - 1} \right){{mod}\left( {2D} \right)}} \end{matrix}}{2D}}} & \left\lbrack {{Formula}\quad 56} \right\rbrack \\ {G = \frac{Z - {Z\quad {{mod}\left( {2{D\left( {D - x - y} \right)}} \right)}}}{2{D\left( {D - x - y} \right)}}} & \quad \\ {B = {Y + \frac{\begin{matrix} {{4\left( {D - y} \right){Cb}} + D - 1 -} \\ {\left( {{4\left( {D - y} \right){Cb}} + D - 1} \right){{mod}\left( {2D} \right)}} \end{matrix}}{2D}}} & \quad \end{matrix}$

[0272] where Z=2D(D-x-y)Y−4(Dy−y²)Cb−4(Dx−x²)Cr+D(D-x-y)−1

[0273] (b) YCbCr->RGB conversion where calculation of rounding up if 5 or greater and rounding down if less than 5

[0274] Based on the formula 54 and the formula 55 shown in the above (3-A), by applying the formula 49 shown in the above (3-B), RGB can be expressed by YCbCr by substituting the formula 56 as follows. In the following expression, Xmod(x)=0 to (x−1), that is, a minimum value is 0 (zero), a maximum value is (x−1), and a mod calculation is expressed by “0˜(x−1)”. $\begin{matrix} {Y^{\prime} = \left\lfloor \frac{{2{Rx}} + {2{G\left( {D - x - y} \right)}} + {2{By}} + D}{2D} \right\rfloor} & \left\lbrack {{Formula}\quad 57} \right\rbrack \\ {\quad {= {\frac{{2{Rx}} + {2{G\left( {D - x - y} \right)}} + {2{By}} + D}{2D} - \frac{O \sim \left( {{2D} - 1} \right)}{2D}}}} & \quad \\ {\quad {{= {Y + \frac{1}{2D^{2}}}}\quad \begin{pmatrix} \begin{matrix} {{2D^{2}} - x - y - 1} \\ {{- {x\left( {O \sim \left( {{2D} - 1} \right)} \right)}} - \left( {O \sim \left( {{2{D\left( {D - x - y} \right)}} - 1} \right)} \right)} \end{matrix} \\ {{- {y\left( {O \sim \left( {{2D} - 1} \right)} \right)}} - {D\left( {O \sim \left( {{2D} - 1} \right)} \right)}} \end{pmatrix}}} & \quad \\ {\quad {= {Y + {Z_{y}\left( {D,x,y} \right)}}}} & \quad \end{matrix}$

[0275] The above formula 57 is calculated. $\begin{matrix} {{- 1} < {- \frac{{2D^{2}} - D}{2D^{2}}} \leq {Z_{y}\left( {D,x,y} \right)} \leq \frac{{2D^{2}} - x - y - 1}{2D^{2}} < 1} & \left\lbrack {{Formula}\quad 58} \right\rbrack \end{matrix}$

[0276] From the above formula 58, since Y′ is an integer, Z_(y) becomes 0 (zero). Accordingly, Y=Y′ can be realized. Similarly, $\begin{matrix} \begin{matrix} {{Cb}^{\prime} = {\left\lfloor \frac{\begin{matrix} {{2\left( {D - y} \right){Max}_{RGB}} - {xR} -} \\ {{\left( {D - x - y} \right)G} + {\left( {D - y} \right)B} + \left( {D - y} \right)} \end{matrix}}{2\left( {D - y} \right)} \right\rfloor - {Max}_{RGB}}} \\ {= {\frac{\begin{pmatrix} {{2\left( {D - y} \right){Max}_{RGB}} - {xR} - {\left( {D - x - y} \right)G} +} \\ {{\left( {D - y} \right)B} + \left( {D - y} \right) - \left( {\left. 0 \right.\sim\left( {{2\left( {D - y} \right)} - 1} \right)} \right)} \end{pmatrix}}{2\left( {D - y} \right)} -}} \\ {{Max}_{RGB}} \\ {= {{Cb} +}} \\ {{{\frac{1}{4{D\left( {D - y} \right)}}\begin{pmatrix} {{4{D\left( {D - y} \right)}{Max}_{RGB}} + {2D^{2}} - {2{Dy}} +} \\ {x + y - D + 1 + {x\left( {\left. 0 \right.\sim\left( {{2D} - 1} \right)} \right)} + \left( \left. 0 \right.\sim \right.} \\ {\left. \left( {{2{D\left( {D - x - y} \right)}} - 1} \right) \right) - {\left( {D - y} \right)\left( \left. 0 \right.\sim \right.}} \\ {\left. \left( {{2D} - 1} \right) \right) - {2{D\left( {\left. 0 \right.\sim\left( {{2\left( {D - y} \right)} - 1} \right)} \right)}}} \end{pmatrix}} -}} \\ {{Max}_{RGB}} \\ {= {{Cb} + {Z_{b}\left( {D,x,y} \right)}}} \end{matrix} & \text{[Formula~~59]} \end{matrix}$

[0277] the above formula 59 is calculated. $\begin{matrix} {{- 1} < {- \frac{{4{D\left( {D - y} \right)}} - {2D} - x - 1}{4{D\left( {D - y} \right)}}} \leq {Z_{b}\left( {D,x,y} \right)} \leq \frac{{4D} - 1}{4D} < 1} & \text{[Formula~~60]} \end{matrix}$

[0278] From the above formula 60, since Cb′ is an integer, Z_(b) becomes 0 (zero). Accordingly, Cb=Cb′ can be realized. Moreover, $\begin{matrix} \begin{matrix} {{Cr}^{\prime} = {\left\lfloor \frac{\begin{matrix} {{2\left( {D - x} \right){Max}_{RGB}} + {\left( {D - x} \right)R} -} \\ {{\left( {D - x - y} \right)G} - {yB} + \left( {D - x} \right)} \end{matrix}}{2\left( {D - x} \right)} \right\rfloor - {Max}_{RGB}}} \\ {= {\frac{\begin{pmatrix} {{2\left( {D - x} \right){Max}_{RGB}} + {\left( {D - x} \right)R} -} \\ {{\left( {D - x - y} \right)G} - {yB} + \left( {D - x} \right) -} \\ \left( {\left. 0 \right.\sim\left( {{2\left( {D - x} \right)} - 1} \right)} \right) \end{pmatrix}}{2\left( {D - x} \right)} - {Max}_{RGB}}} \\ {= {{Cr} +}} \\ {{{\frac{1}{4{D\left( {D - x} \right)}}\begin{pmatrix} \begin{matrix} {{4{D\left( {D - x} \right)}{Max}_{RGB}} + {2D^{2}} - {2{Dx}} +} \\ {x + y - D + 1 - {\left( {D - x} \right)\left( \left. 0 \right.\sim \right.}} \end{matrix} \\ \begin{matrix} {\left. \left( {{2D} + 1} \right) \right) + \left( {\left. 0 \right.\sim\left( {{2{D\left( {D - x - y} \right)}} -} \right.} \right.} \\ {\left. \left. 1 \right) \right) + {y\left( {\left. 0 \right.\sim\left( {{2D} - 1} \right)} \right)} - {2{D\left( \left. 0 \right.\sim \right.}}} \\ \left. \left( {{2\left( {D - x} \right)} - 1} \right) \right) \end{matrix} \end{pmatrix}} -}} \\ {{Max}_{RGB}} \\ {= {{Cr} + {Z_{r}\left( {D,x,y} \right)}}} \end{matrix} & \text{[Formula~~61]} \end{matrix}$

[0279] the above formula 61 is calculated. $\begin{matrix} {{- 1} < {- \frac{{4{D\left( {D - x} \right)}} - {2D} - y - 1}{4{D\left( {D - x} \right)}}} \leq {Z_{r}\left( {D,x,y} \right)} \leq \frac{{4D} - 1}{4D} < 1} & \text{[Formula~~62]} \end{matrix}$

[0280] From the above formula 62, since Cr′ is an integer, Z_(r) becomes 0 (zero). Accordingly, Cr=Cr′ can be realized.

[0281] In addition, the color conversion according to the present invention can guarantee the reversibility for image data having more than 256 levels.

[0282] According to the present invention, in the forward transformation and the backward transformation, a unit system having a lower resolution revel is used as the common unit system and the data conversion is conducted by the integer operation between unit systems having different resolution levels, by using the common unit system. Therefore, a unit system having a higher resolution level is sufficiently processed and then it is possible to realize the reversible conversion where data can be perfectly restored.

[0283] In particular, regarding the digital color conversion using a quantization of analog Y, Cb, Cr signals between the unit system for the color space RGB and the unit system for the color space YCbCr, the unit system for the color space YCbCr having a lower resolution level is used as the common unit system. Thus, since the unit system for the color space RGB is sufficiently processed, it is possible to realize the reversible conversion in a color space where data can be perfectly restored.

[0284] Moreover, it is possible to realize the reversible conversion in the color space where data can be perfectly restored by a predetermined color converting function.

[0285] Furthermore, in a case in that a unit system for a print in such as a color space YMC is used, it is possible to realize the reversible conversion in the color space where data can be perfectly restored.

[0286] In particular, regarding the color conversion in accordance with the international standard specifying a data for at for converting an analog video signal into the digital data between the unit system in the color space RGB and the unit system in the color space YCbCr, the color space YCbCr having a lower resolution level is used as the common unit system. Therefore, since the unit system in the color space RGB having a higher resolution level can be sufficiently processed, it is possible to realize the reversible conversion of the color space where data can be perfectly restored.

[0287] In particular, regarding the color conversion of the original color based on the brightness and the color difference between the unit system in the color space RGB and the unit system in the color space YCbCr, the color space YCbCr having a lower resolution level is used as the common unit system. Therefore, since the color space RGB having a higher resolution level can be sufficiently processed, it is possible to realize the reversible conversion in the color space where data can be perfectly restored.

[0288] Moreover, in the available ranges for R(o)G(o)B(o) data and Y(o)Cb(o)Cr(o) data, a limited range is provided in that a maximum value and a minimum value are, limited. Therefore, without being out of the range of the color converting function, it is possible to conduct the compatible conversion where data can be perfectly restored.

[0289] In particular, regarding the length conversion between the EM type data using an inch unit system and the {fraction (1/100)} mm type data using a meter unit system in the personal computer and the printer, the inch unit system for the EMU type data having a lower resolution level is used as the common unit system. Therefore, since the meter unit system for the {fraction (1/100)} mm type data having a higher resolution level can be sufficiently processed, it is possible to realize the reversible conversion where length data can be perfectly restored.

[0290] The present invention is not limited to the specifically disclosed embodiments, and variations and modifications may be made without departing from the scope of the present invention.

[0291] The present application is based on the Japanese Priority Applications No. 2003-013585 filed on Jan. 22, 2003 and No. 2004-13138 filed on Jan. 21, 2004, the entire contents of which are hereby incorporated by reference. 

What is claimed is:
 1. A method for reversibly converting a data format in that a forward transformation and a backward transformation are reciprocally conducted for data between unit systems having different resolution levels, wherein in the forward transformation and the backward transformation, a first unit system having a lower resolution level is used as a common unit system, and a reversible data conversion is conducted by an integer operation for data in the first unit system having the lower resolution level and data in a second unit system having a higher resolution level higher than the first unit system.
 2. The method as claimed in claim 1, wherein the first unit system is a first color space having the lower resolution level, and the second unit system is a second color space having the higher resolution level, wherein in a case in that a digital color conversion by quantizing the first color space having the lower resolution level and being analog, by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 3. The method as claimed in clans 2, wherein the first data in the first color space are YCbCr data, and the second data in the second color space are RGB data, and the third data in the first color space are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, when the forward transformation is conducted from the RGB data to the Y′Cb′CR′ data, a first formula is conducted by an integer operation of a color converting functions where the first formula is defined as $Y = {\left\lfloor \frac{\begin{matrix} {{219 \times \left( {{299 \times R} + {587 \times G} + {114 \times B}} \right)} +} \\ {{16 \times 255 \times 1000} + {255 \times {1000/2}}} \end{matrix}}{255 \times 1000} \right\rfloor }$ ${Cb} = \left\lfloor \frac{\begin{matrix} {{224 \times 564 \times \left( {{{- 299} \times R} - {587 \times G} + {886 \times B}} \right)} +} \\ {{128 \times 255 \times 1000 \times 1000} + {255 \times 1000 \times {1000/2}}} \end{matrix}}{255 \times 1000 \times 1000} \right\rfloor$ ${Cr} = \left\lfloor \frac{\begin{matrix} {{224 \times 713 \times \left( {{701 \times R} - {587 \times G} - {114 \times B}} \right)} +} \\ {{128 \times 255 \times 1000 \times 1000} + {255 \times 1000 \times {1000/2}}} \end{matrix}}{255 \times 1000 \times 1000} \right\rfloor$ ⌊⌋:  round  a  fractional  part  and  the  same  in  the  following

and when the backward transformation is conducted from the RGB data to the YCbCr data, a second formula is conducted by an integer operation of a color converting functions where the second formula is defined as $R = \left\lfloor \frac{\begin{matrix} {\left\lbrack {{219 \times 1000 \times \left( {{Cr} - 128} \right)} + {713 \times 224 \times \left( {Y - 16} \right)}} \right\rbrack \times} \\ {255 + {713 \times 224 \times {219/2}}} \end{matrix}}{713 \times 224 \times 219} \right\rfloor$ $G = \left\lfloor \frac{\begin{matrix} {{\begin{bmatrix} {{713 \times 224 \times 587 \times 564\left( {Y - 16} \right)} -} \\ {{299 \times 219 \times 564 \times 1000 \times \left( {{Cr} - 128} \right)} -} \\ {114 \times 219 \times 713 \times 1000 \times \left( {{Cb} - 128} \right)} \end{bmatrix} \times 255} +} \\ {219 \times 713 \times 224 \times 587 \times {564/2}} \end{matrix}}{219 \times 713 \times 224 \times 587 \times 564} \right\rfloor$ $B = \left\lfloor \frac{\begin{matrix} {\left\lbrack {{219 \times 1000 \times \left( {{Cb} - 128} \right)} + {564 \times 224 \times \left( {Y - 16} \right)}} \right\rbrack \times} \\ {255 + {564 \times 224 \times {219/2}}} \end{matrix}}{564 \times 224 \times 219} \right\rfloor$


4. The method an claimed in claim 1, wherein the first unit system is a first color space having the lower resolution level and the second unit system is a second color apace having the higher resolution level, wherein in a case in that a digital color conversion by quantizing the first color space having the lower resolution level and being analog, by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 5. The method as claimed in claim 4, wherein the first data in the first color space are YCbCr data, and the second data in the second color space are RGB data, and the third data in the first color space are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, the forward transformation from the second data in the second color space to the third data in the first color space is conducted by an integer operation where MAX denotes a maximum value of the resolution level and Y, M, and C are set to be Y=MAX−B, M=MAX−G, and C=MAX−R in the first formula, and the backward transformation from the first data in the first color space to the second data in the second color space is conducted by an integer operation where MAX denotes a maximum value of the resolution level and Y, M, and C are set to be Y=MAX−B, M=MAX−G, and C=MAX−R in the second formula.
 6. The method as claimed in claim 16 wherein the first unit system is a first color space having the lower resolution level and the second unit system is a second color space having the higher resolution level, wherein in a case of conducing a color conversion in accordance with an international standard in which the data format for converting an analog video signal into digital data is specified, by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 7. The method as claimed in claim 6, wherein the first data in the first color space are YCbCr data, and the second data in the second color space are quantized R(d)G(d)B(d) data, and the third data in the first color space are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, in a conversion from an analog R(a)G(a)B(a) data to the YCbCr data, the forward transformation from the YCbCr data by conducting a color converting function in a third formula defined as $Y = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{77 \times {R(a)}} + {150 \times {G(a)}} + {29 \times {B(a)}}} \right)} +} \\ {{16 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor$ ${Cb} = \left\lfloor \frac{\begin{matrix} {\left. {{219 \times \left( {{{- 44} \times {R(a)}} - {87 \times {G(a)}}} \right)} + {131 \times {B(a)}}} \right) +} \\ {{128 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor$ ${Cr} = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{131 \times {R(a)}} - {110 \times {G(a)}} - {21 \times {B(a)}}} \right)} +} \\ {{128 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor$

to the R(d)G(d)B(d) data is conducted by an integer operation of a color converting function in a fourth formula defined as ${R(d)} = \left\lfloor \frac{\begin{matrix} \left( {{16772821 \times Y} + {22904709 \times {Cr}} - {41320 \times}} \right. \\ {{\left. {{Cb} - 2926513792}\quad \right) \times 2} + 16772821} \end{matrix}}{16772821 \times 2} \right\rfloor$ ${G(d)} = \left\lfloor \frac{\begin{matrix} \left( {{470873 \times Y} - {329527 \times {Cr}} - {157064 \times {Cb}} +} \right. \\ {{\left. 62283648\quad \right) \times 2} + 470873} \end{matrix}}{470873 \times 2} \right\rfloor$ ${B(d)} = \left\lfloor \frac{\begin{matrix} \left( {{16772821 \times Y} - {102267 \times {Cr}} + {29047960 \times}} \right. \\ {{\left. {{Cb} - 3705048704}\quad \right) \times 2} + 16772821} \end{matrix}}{16772821 \times 2} \right\rfloor$

and when the backward transformation is conducted from the R(d)G(d)B(d) data to the Y′Cb′Cr′ data, a fifth formula is conducted by an integer operation of a color converting functions where the second formula is defined as $Y^{\prime} = \left\lfloor \frac{{77 \times {R(d)}} + {150 \times {G(d)}} + {29 \times {B(d)}} + 128}{256} \right\rfloor$ ${Cb}^{\prime} = \left\lfloor \frac{{{- 44} \times {R(d)}} - {87 \times {G(d)}} + {131 \times {B(d)}} + {128 \times 256} + 128}{256} \right\rfloor$ ${Cr}^{\prime} = {\left\lfloor \frac{{131 \times {R(d)}} - {110 \times {G(d)}} - {21 \times {B(d)}} + {128 \times 256} + 128}{256} \right\rfloor.}$


8. The method as claimed in claim 1, wherein the first unit system is a first color space having the lower resolution level, and the second unit system is a second color space having the higher r solution level, wherein in a case of conducting an original color based on the brightness and the color difference, by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 9. The method as claimed in claim 8, wherein the first data in the first color space are Y(o)Cb(o)Cr(o) data, and the second data in the second color space are R(o)G(o)B(o) data, and the third data in the first color space are Y(o)′Cb(o)′Cr(o)′, and in a case of converting to the Y(o)′Cb(o)′Cr(o)′ data after the Y(o)Cb(o)Cr(o) data is converted into the R(o)G(o)B(o) data, when the forward transformation is conducted from the RGB data to the Y(o)′Cb(o)′CR(o)′ data, a sixth formula is conducted by an integer operation of a color converting functions where the sixth formula is defined as ${Y(o)} = \left\lfloor \frac{{2 \times \left( {{x_{M} \times {R(o)}} + {\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} + {y_{M} \times {B(o)}}} \right)} + D}{2 \times D} \right\rfloor$ ${{Cb}(o)} = {\left\lfloor \frac{\begin{matrix} {{\left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor \times 2 \times \left( {D - y_{M}} \right)} - {x_{M} \times {R(o)}} -} \\ {{\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} + {\left( {D - y_{M}} \right) \times \left( {{B(o)} + 1} \right)}} \end{matrix}}{2 \times \left( {D - y_{M}} \right)} \right\rfloor - \left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor}$ ${{Cr}(o)} = {\left\lfloor \frac{\begin{matrix} {{\left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor \times 2 \times \left( {D - x_{M}} \right)} + {\left( {D - x_{M}} \right) \times \left( {{R(o)} + 1} \right)} -} \\ {{\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} - {y_{M} \times {B(o)}}} \end{matrix}}{2 \times \left( {D - x_{M}} \right)} \right\rfloor - \left\lfloor \frac{{MAX}_{RGB} + 1}{2} \right\rfloor}$

and when the backward transformation is conducted from the R(o)G(o)B(o) data to the Y(o)Cb(o)Cr(o) data, a seventh formula is conducted by an integer operation of a color converting functions where the seventh formula is defined as $\begin{matrix} {{R(o)} = \left\lfloor \frac{{2 \times \left( {{D \times {Y(o)}} + {2 \times \left( {D - x_{M}} \right) \times C\quad {r(o)}}} \right)} + D}{2 \times D} \right\rfloor} \\ {{G(o)} = \left\lfloor \frac{\begin{pmatrix} \left( {2 \times \left( {{\left( {D - x_{M} - y_{M}} \right) \times D \times Y(o)} -} \right.} \right. \\ {{2 \times y_{M} \times \left( {D - y_{M}} \right) \times C\quad {b(o)}} - {2 \times x_{M} \times}} \\ {\left. {\left( {D - x_{M}} \right) \times {{Cr}(o)}} \right) + {\left( {D - x_{M} - y_{M}} \right) \times D}} \end{pmatrix}}{2 \times \left( {D - x_{M} - y_{M}} \right) \times D} \right\rfloor} \\ {{B(o)} = \left\lfloor \frac{{2 \times \left( {{D \times {Y(o)}} + {2 \times \left( {D - y_{M}} \right) \times C\quad {b(o)}}} \right)} + D}{2 \times D} \right\rfloor} \end{matrix}$


10. The method as claimed in claim 9, wherein a color conversion for the original color based on the brightness and the color difference, the first data in the first color space are Y(o)Cb(o)Cr(o) data, and the second data in the second color space are R(o)G(o)B(o) data, and the third data in the first color space are Y(o)′Cb(o)′Cr(o)′, and in a case of converting to the Y(o)′Cb(o)′Cr(o)′ data after the Y(o)Cb(o)Cr(o) data is converted into the R(o)G(o)B(o) data, when the forward transformation is conducted from the RGB data to the Y(o)′Cb(o)′CR(o)′ data, an eighth formula is conducted by an integer operation of a color converting functions where the eighth formula is defined as $\begin{matrix} {{Y(o)} = \left\lfloor \frac{\left( {{299 \times {R(o)}} + {587 \times {G(o)}} + {114 \times {B(o)}}} \right) + 500}{1000} \right\rfloor} \\ {{{Cb}(o)} = {\left\lfloor \frac{{128 \times 2 \times 886} - {299 \times {R(o)}} - {587 \times {G(o)}} + {886 \times \left( {{B(o)} + 1} \right)}}{2 \times 886} \right\rfloor - 128}} \\ {{{Cr}(o)} = {\left\lfloor \frac{{128 \times 2 \times 701} + {701 \times \left( {{R(o)} + 1} \right)} - {587 \times {G(o)}} - {114 \times {B(o)}}}{2 \times 701} \right\rfloor - 128}} \end{matrix}$

and when the backward transformation is conducted from the R(o)G(o)B(o) data to the Y(o)Cb(o)Cr(o) data, a ninth formula is conducted by an integer operation of a color converting functions where the ninth formula in defined as $\begin{matrix} {{R(o)} = \left\lfloor \frac{\left( {{1000 \times {Y(o)}} + {1402 \times {{Cr}(o)}}} \right) + 500}{1000} \right\rfloor} \\ {{G(o)} = \left\lfloor \frac{\begin{matrix} {{587 \times 1000 \times {Y(o)}} - {2 \times 114 \times 886 \times {{Cb}(o)}} -} \\ {\left. {2 \times 299 \times 701 \times {{Cr}(o)}} \right) + {587 \times 500}} \end{matrix}}{587 \times 1000} \right\rfloor} \\ {{B(o)} = \left\lfloor \frac{\left( {{1000 \times {Y(o)}} + {1772 \times {{Cb}(o)}}} \right) + 500}{1000} \right\rfloor} \end{matrix}$


11. The method as claimed in claim 9 or 10, wherein maximum values and minimum value are limited in available ranges for the R(o)G(o)B(o) data and the Y(o)Cb(o)Cr(c) data.
 12. The method as claimed in claim 1, wherein the first unit system is a EM unit system using an inch unit system and the second unit system is a {fraction (1/100)} mm unit system using a meter unit system, and by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 13. The method as claimed in claim 12, wherein after the first data shown in the BMU unit system is converted into the second data shown in the {fraction (1/100)} mm using the meter unit system, a tenth formula is conducted to convert to the third data showing the BMU unit system where the tenth formula is defined as <{fraction (1/100)} mm data>=└(2540×<BMU data>+600)/1200┘<BMU data>=└(1200×<{fraction (1/100)} mm data>+1270)/2540┘.
 14. An apparatus for reversibly converting a data format in that a forward transformation and a backward transformation are reciprocally conducted for data between unit systems having different resolution levels, comprising a data format reversibly converting part for reversibly converting a data format, wherein in the forward transformation and the backward transformation, a first unit system having a lower resolution level is used as a common unit system, and a reversible data conversion is conducted by an integer operation for data in the first unit system having the lower resolution level and data in a second unit system having a higher resolution level higher than the first unit system.
 15. The apparatus as claimed in claim 14, wherein the data format reversibly converting part conducts the reversible data conversion in that the first unit system is a first color space having the lower resolution level, and the second unit system is a second color space having the higher resolution level, wherein the data format reversibly converting part conducts a reversible data conversion in a case in that a digital color conversion by quantizing the first color space having the lower resolution level and being analog, by using the first color apace as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 16. The method as claimed in claim 15, wherein the data format reversibly converting part conducts the reversible data conversion in that the first data in the first color space are YCbCr data, and the second data in the second color space are RGB data, and the third data in the first color apace are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, when the forward transformation is conducted from the RGB data to the Y′Cb′CR′ data, a first formula is conducted by an integer operation of a color converting functions where the first formula is defined as $\begin{matrix} {Y = {\left\lfloor \frac{\begin{matrix} {{219 \times \left( {{299 \times R} + {587 \times G} + {114 \times B}} \right)} +} \\ {{16 \times 255 \times 1000} + {255 \times {1000/2}}} \end{matrix}}{255 \times 1000} \right\rfloor \quad }} \\ {{Cb} = \left\lfloor \frac{\begin{matrix} {{224 \times 564 \times \left( {{299 \times R} - {587 \times G} + {886 \times B}} \right)} +} \\ {{128 \times 255 \times 1000 \times 1000} + {255 \times 1000 \times {1000/2}}} \end{matrix}}{255 \times 1000 \times 1000} \right\rfloor} \\ {{{Cr} = \left\lfloor \frac{\begin{matrix} {{224 \times 713 \times \left( {{701 \times R} - {587 \times G} - {114 \times B}} \right)} +} \\ {{128 \times 255 \times 1000 \times 1000} + {255 \times 1000 \times {1000/2}}} \end{matrix}}{255 \times 1000 \times 1000} \right\rfloor}{{{\lfloor\rfloor}} :: \quad {{round}\quad a\quad {fractional}\quad {part}\quad {and}\quad {the}\quad {same}\quad {in}\quad {the}\quad {following}}}} \end{matrix}$

and when the backward transformation is conducted from the RGB data to the YCbCr data, a second formula is conducted by an integer operation of a color converting functions where the second formula is defined as $R = \left\lfloor \begin{matrix} {\left\lbrack {{219 \times 1000 \times \left( {{Cr} - 128} \right)} + {713 \times 224 \times \left( {Y - 16} \right)}} \right\rbrack \times} \\ \frac{255 + {713 \times 224 \times {219/2}}}{713 \times 224 \times 219} \end{matrix} \right\rfloor$ $G = \left\lfloor \frac{\begin{bmatrix} {\quad {{713 \times 224 \times 587 \times 564\left( {Y - 16} \right)} -}} \\ {{299 \times 219 \times 564 \times 1000 \times \left( {{Cr} - 128} \right)} -} \\ {114 \times 219 \times 713 \times 1000 \times \left( {{Cb} - 128} \right)} \end{bmatrix} \times \begin{matrix} {255 + {219 \times 713 \times}} \\ {224 \times 587 \times {564/2}} \end{matrix}}{219 \times 713 \times 224 \times 587 \times 564} \right\rfloor$ $B = \left\lfloor \begin{matrix} \left\lbrack {{219 \times 1000 \times \left( {{Cb} - 128} \right)} + {564 \times 224 \times}} \right. \\ \frac{{\left. \left( {Y - 16} \right) \right\rbrack \times 255} + {564 \times 224 \times {219/2}}}{564 \times 224 \times 219} \end{matrix} \right\rfloor$


17. The apparatus as claimed in claim 14, wherein the data format reversibly converting part conducts the reversible data conversion in that the first unit system is a first color space having the lower resolution level and the second unit system is a second color space having the higher resolution level, wherein in a case in that a digital color conversion by quantizing the first color space having the lower resolution level and being analog, by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 18. The apparatus as claimed in claim 17, wherein the first data in the first color space are YCbCr data, and the second data in the second color space are RGB data, and the third data in the first color space are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, the forward transformation from the second data in the second color space to the third data in the first color space is conducted by an integer operation where M denotes a maximum value of the resolution level and Y, X, and C are set to be Y=MAX−B, M=MAX−G, and C=MAX−R in the first formula, and the backward transformation from the first data in the first color space to the second data in the second color space is conducted by an integer operation where MAX denotes a maximum value of the resolution level and Y, M, and C are set to be Y=MAX−B, M=MAX−G, and C=MAX−R in the second formula.
 19. The apparatus as claimed in claim 14, wherein the data format reversibly converting part conducts the reversible data conversion in that the first unit system is a first color space having the lower resolution level and the second unit system is a second color space having the higher resolution level, wherein in a case of conducing a color conversion in accordance with an international standard in which the data format for converting an analog video signal into digital data is specified, by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 20. The apparatus as claimed in claim 19, wherein the data format reversibly converting part conducts the reversible data conversion in that the first data in the first color space are YCbCr data, and the second data in the second color space are quantized R(d)G(d)B(d) data, and the third data in the first color space are Y′Cb′Cr′, and in a case of converting to the Y′Cb′Cr′ data after the YCbCr data is converted into the RGB data, in a conversion from an analog R(a)G(a)B(a) data to the YCbCr data, the forward transformation from the YCbCr data by conducting a color converting function in a third formula defined as ${Y = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{77 \times {R(a)}} + {150 \times {G(a)}} + {29 \times {B(a)}}} \right)} +} \\ {{16 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor}\quad$ ${{Cb} = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{{- 44} \times {R(a)}} - {87 \times {G(a)}} + {131 \times {B(a)}}} \right)} +} \\ {{128 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor}\quad$ ${{Cr} = \left\lfloor \frac{\begin{matrix} {{219 \times \left( {{131 \times {R(a)}} - {110 \times {G(a)}} - {21 \times {B(a)}}} \right)} +} \\ {{128 \times 256 \times 256} + {256 \times 128}} \end{matrix}}{256 \times 256} \right\rfloor}\quad$

to the R(d)G(d)B(d) data is conducted by an integer operation of a color converting function in a fourth formula defined as ${R(d)} = \left\lfloor \frac{\begin{matrix} \left( {{16772821 \times Y} + {22904709 \times {Cr}} - {41320 \times}} \right. \\ {{\left. {{Cb} - 2926513792} \right) \times 2} + 16772821} \end{matrix}}{16772821 \times 2} \right\rfloor$ ${G(d)} = \left\lfloor \frac{\begin{matrix} \left( {{470873 \times Y} - {329527 \times {Cr}} - {157064 \times}} \right. \\ {{\left. {{Cb} + 62283648} \right) \times 2} + 470873} \end{matrix}}{470873 \times 2} \right\rfloor$ ${B(d)} = \left\lfloor \frac{\begin{matrix} \left( {{16772821 \times Y} - {102267 \times {Cr}} +} \right. \\ {{\left. {{29047960 \times {Cb}} - 3705048704} \right) \times 2} + 16772821} \end{matrix}}{16772821 \times 2} \right\rfloor$

and when the backward transformation in conducted from the R(d)G(d)B(d) data to the Y(d)′Cb(d)′Cr(d)′ data, a fifth formula is conducted by an integer operation of a color converting functions where the fifth formula is defined as ${Y^{\prime} = \left\lfloor \frac{{77 \times {R(d)}} + {150 \times {G(d)}} + {29 \times {B(d)}} + 128}{256} \right\rfloor}\quad$ ${{Cb}^{\prime} = \left\lfloor \frac{\begin{matrix} {{{- 44} \times {R(d)}} - {87 \times {G(d)}} + {131 \times {B(d)}} +} \\ {{128 \times 256} + 128} \end{matrix}}{256} \right\rfloor}\quad$ ${{Cr}^{\prime} = \left\lfloor \frac{\begin{matrix} {{131 \times {R(d)}} - {110 \times {G(d)}} - {21 \times {B(d)}} +} \\ {{128 \times 256} + 128} \end{matrix}}{256} \right\rfloor}\quad$


21. The apparatus as claimed in claim 14, wherein the data format reversibly converting part conducts the reversible data conversion in that the first unit system is a first color space having the lower resolution level, and the second unit system is a second color space having the higher resolution level, wherein in a case of conducting an original color based and the brightness and the color difference, by using the first color space as the gammon unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color space and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 22. The apparatus as claimed in claim 21, wherein the data format reversibly converting part conducts the reversible data conversion in that the first data in the first color space are Y(o)Cb(o)Cr(o) data, and the second data in the second color space are R(o)G(o)B(o) data, and the third data in the first color space are Y(o)′Cb(o)′Cr(o)′, and in a case of converting to the Y(o)′Cb(o)′Cr(o)′ data after the Y(o)Cb(o)Cr(o) data is converted into the R(o)G(o)B(o) data, when the forward transformation is conducted from the RGB data to the Y(o)′Cb(o)′CR(o)′ data, a sixth formula is conducted by an integer operation of a color converting functions where the sixth formula is defined as $\begin{matrix} {{Y(o)} = \left\lfloor \frac{{2 \times \left( {{x_{M} \times {R(o)}} + {\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} + {y_{M} \times {B(o)}}} \right)} + D}{2 \times D} \right\rfloor} \\ {{{Cb}(o)} = {\left\lfloor \frac{\begin{matrix} {{\left\lfloor \frac{{MAX}_{ROB} + I}{2} \right\rfloor \times 2 \times \left( {D - y_{M}} \right)} - {x_{M} \times R(o)} -} \\ {{\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} + {\left( {D - y_{M}} \right) \times \left( {{B(o)} + 1} \right)}} \end{matrix}}{2 \times \left( {D - y_{M}} \right)} \right\rfloor - \quad \left\lfloor \frac{{MAX}_{ROB} + I}{2} \right\rfloor}} \\ {{{Cr}(o)} = {\left\lfloor \frac{\begin{matrix} {{\left\lfloor \frac{{MAX}_{ROB} + 1}{2} \right\rfloor \times 2 \times \left( {D - x_{M}} \right)} + {\left( {D - x_{M}} \right) \times}} \\ {\left( {{R(o)} + 1} \right) - {\left( {D - x_{M} - y_{M}} \right) \times {G(o)}} - {y_{M} \times {B(o)}}} \end{matrix}}{2 \times \left( {D - x_{M}} \right)} \right\rfloor - \quad \left\lfloor \frac{{MAX}_{ROB} + 1}{2} \right\rfloor}} \end{matrix}$

and when the backward transformation is conducted from the R(o)G(o)B(o) data to the Y(o)Cb(o)Cr(o) data, a seventh formula is conducted by an integer operation of a color converting functions where the seventh formula is defined as $\begin{matrix} {{R(o)} = \left\lfloor \frac{{2 \times \left( {{D \times {Y(o)}} + {2 \times \left( {D - x_{M}} \right) \times {{Cr}(o)}}} \right)} + D}{2 \times D} \right\rfloor} \\ {{G(o)} = \left\lfloor \frac{\begin{pmatrix} {2 \times \left( {{\left( {D - x_{M} - y_{M}} \right) \times D \times {Y(o)}} - {2 \times y_{M} \times}} \right.} \\ {\left. {{\left( {D - y_{M}} \right) \times {{Cb}(o)}} - {2 \times x_{M} \times \left( {D - x_{M}} \right) \times {{Cr}(o)}}} \right) +} \\ {\left( {D - x_{M} - y_{m}} \right) \times d} \end{pmatrix}}{2 \times \left( {D - x_{M} - y_{M}} \right) \times D} \right\rfloor} \\ {{B(o)} = \left\lfloor \frac{{2 \times \left( {{D \times {Y(o)}} + {2 \times \left( {D - y_{M}} \right) \times {{Cb}(o)}}} \right)} + D}{2 \times D} \right\rfloor} \end{matrix}$


23. The apparatus as claimed in claim 22, wherein the data format reversibly converting part conducts the reversible data conversion in that a color conversion for the original color based on the brightness and the color difference, the first data in the first color apace are Y(o)Cb(o)Cr(o) data, and the second data in the second color space are R(o)G(o)B(o) data, and the third data in the first color space are Y(o)′Cb(o)′Cr(o)′, and in a case of converting to the Y(o)′Cb(o)′Cr(o)′ data after the Y(o)Cb(o)Cr(o) data is converted into the R(o)G(o)B(o) data, when the forward transformation is conducted from the RGB data to the Y(o)′Cb(o)′CR(o)′ data, an eighth formula is conducted by an integer operation of a color converting functions where the eighth formula is defined as $\begin{matrix} {{Y(o)} = \left\lfloor \frac{\left( {{299 \times {R(o)}} + {587 \times {G(o)}} + {114 \times {B(o)}}} \right) + 500}{1000} \right\rfloor} \\ {{{Cb}(o)} = {\left\lfloor \frac{{128 \times 2 \times 886} - {299 \times {R(o)}} - {587 \times {G(o)}} + {886 \times \left( {{B(o)} + 1} \right)}}{2 \times 886} \right\rfloor - 128}} \\ {{{Cr}(o)} = {\left\lfloor \frac{{128 \times 2 \times 701} + {701 \times \left( {{R(o)} + 1} \right)} - {587 \times {G(o)}} - {114 \times {B(o)}}}{2 \times 701} \right\rfloor - 128}} \end{matrix}$

and when the backward transformation is conducted from the R(o)G(o)B(o) data to the Y(o)Cb(o)Cr(o) data, a ninth formula is conducted by an integer operation of a color converting functions where the ninth formula is defined as $\begin{matrix} {{R(o)} = \left\lfloor \frac{\left( {{1000 \times {Y(o)}} + {1402 \times {{Cr}(o)}}} \right) + 500}{1000} \right\rfloor} \\ {{G(o)} = \left\lfloor \frac{\begin{matrix} \left( {{587 \times 1000 \times {Y(o)}} - {2 \times 114 \times 886 \times {{Cb}(o)}} -} \right. \\ {\left. {2 \times 299 \times 701 \times {{Cr}(o)}} \right) + {587 \times 500}} \end{matrix}}{587 \times 1000} \right\rfloor} \\ {{B(o)} = \left\lfloor \frac{\left( {{1000 \times {Y(o)}} + {1772 \times {{Cb}(o)}}} \right) + 500}{1000} \right\rfloor} \end{matrix}$


24. The apparatus as claimed in claim 22 or 23, wherein the data format reversibly converting part conducts the reversible data conversion in that maximum values and minimum value are limited in available ranges for the R(o)G(o)B(o) data and the Y(o)Cb(o)Cr(o) data.
 25. The apparatus as claimed in claim 14, wherein the data format reversibly converting part conducts the reversible data conversion in that the first unit system is a BMU unit system using an inch unit system and the second unit system is a {fraction (1/100)} mm unit system using a meter unit system, and by using the first color space as the common unit system, the reversible data conversion is conducted by the integer operation, so that the backward transformation from first data in the first color space to second data in the second color apace and the forward transformation from the second data in the second color space to third data in the first color space are conducted and the first data corresponds to the third data.
 26. The method as claimed in claim 24, wherein the data format reversibly converting part conducts the reversible data conversion in that after the first data shown in the BMU unit system is converted into the second data shown in the {fraction (1/100)} using the meter unit system, a tenth formula is conducted to convert to the third data showing the E unit system where the tenth formula is defined as <{fraction (1/100)} mm data>=└(2540×<BMU data>+600)/1200┘<BMU data>=└(1200×<{fraction (1/100)} mm data>+1270)/2540┘.
 27. The method an claimed in claim 1, wherein the integer operation conducts the reversible conversion using powers of
 2. 28. The method as claimed in claim 10, wherein the forward transformation from the R(o)G(o)B(o) data to the Y(o)′Cb(o)′Cr(o)′ data is conducted by an eleventh formula using powers of 2 derived from the sixth formula where the eleventh formula is defined as $\begin{matrix} {{Y(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {1225 \times {R(o)}} + {2404 \times {G(o)}} + {467 \times {B(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{{Cb}(o)} = {\frac{\left( {128 \times 2^{12}} \right) - {691 \times {R(o)}} - {1357 \times {G(o)}} + {2^{11} \times {B(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{{Cr}(o)} = {\frac{\left( {128 \times 2^{12}} \right) - {2^{11} \times {R(o)}} - {1715 \times {G(o)}} - {333 \times {B(o)}} + 2^{11}}{2^{12}} - 128}} \end{matrix}$

and the backward transformation from the Y(o)Cb(o)Cr(o) data to the R(o)G(o)B(o) data is conducted by a twelfth formula using powers of 2 derived from the seventh formula where the twelfth formula is defined as $\begin{matrix} {{R(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} + {5743 \times {{Cr}(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{G(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} - {1410 \times {{Cb}(o)}} - {2925 \times {{Cr}(o)}} + 2^{11}}{2^{12}} - 128}} \\ {{B(o)} = {\frac{\left( {128 \times 2^{12}} \right) + {2^{12} \times {Y(o)}} + {7258 \times {{Cb}(o)}} + 2^{11}}{2^{12}} - 128}} \end{matrix}$


29. The method as claimed in claim 27, wherein the powers of 2 is conducted by bit shifts.
 30. The method as claimed in claim 28, wherein the forward transformation from the R(o)G(o)B(o) data to the Y(o)′Cb(o)′Cr(o)′ data is conducted by a thirteenth formula using powers of 2 derived from the sixth formula where the thirteenth formula is defined as Y(o)=(((128<<12)+1225×R(o)+2404×G(o)+467×B(o)+(1<<11))>>12)−128; Cb(o)=(((128<<12)−691×R(o)−1357×G(o)+2048×B(o)+(1<<11))>>12)−128; Cr(o)=(((128<<12)−2048×R(o)−1715×G(o)−333×B(o)+(1<<11))>>12)−128; and the backward transformation from the Y(o)Cb(o)Cr(o) data to the R(o)G(o)B(o) data is conducted by a fourteenth formula using powers of 2 derived from the seventh formula where the fourteenth formula is defined as R(o)=(((128<<12)+4096×Y(o)+5743×Cr(o)+(1<<11))>>12)−128; G(o)=(((128<<12)+4096×Y(o)−1410×Cb(o)−2925×Cr(o)+(1<<11))>>12)−128; B(o)=(((128<<12)+4096×Y(o)+7258×Cb(o)+(1<<11))>>12)<128.
 31. The method as claimed in claim 2, wherein at a conversion from data in the first unit system to data in the second unit system and a conversion from data in the second unit system to data in the first unit system, a process for rounding up if 5 or greater and rounding down if less than 5 is conducted.
 32. The method as claimed in claim 2, wherein a first process for rounding up if 5 or greater and rounding down if lose than 5 is conducted at a conversion from data in the first unit system to data in the second unit system, and a second process for rounding up if 6 or greater and rounding down if less than 6 is conducted at a conversion from data in the second unit system to data in the first unit system,
 33. A computer-executable program to cause a computer to reversibly transform a data format, in that a forward transformation and a backward transformation are reciprocally conducted for data between unit systems having different resolution levels, wherein in the forward transformation and the backward transformation, a first unit system having a lower resolution level in used as a common unit system, and a reversible data conversion is conducted by an integer operation for data in the first unit system having the lower resolution level and data in a second unit system having a higher resolution level higher than the first unit system.
 34. A computer-readable recording medium recording program code to cause a computer to reversibly transform a data format, in that a forward transformation and a backward transformation are reciprocally conducted for data between unit systems having different resolution levels, wherein in the forward transformation and the backward transformation, a first unit system having a lower resolution level is used as a common unit system, and a reversible data conversion is conducted by an integer operation for data in the first unit system having the lower resolution level and data in a second unit system having a higher resolution level higher than the first unit system. 